Eddie Kohler
8bcc82aa74
Parser: Set ordered list_item_open token info to input marker.
For instance, in a list
1. Item 1
20. Item 2
the first list_item_open token will have token.info === '1', and the
second will have token.info === '20'.
This is useful for later rendering plugins that might want to
use the actual markers.
3 years ago
Alex Kocharin
fa7a419161
Fix edge case for list indents
Now list items cannot be indented more than 4 spaces from the first,
as per commonmark 0.29 spec:
- item 1
- item 2
- item 3
- item 4
- this one is a paragraph continuation
5 years ago
Ullallulloo
bf4ba21254
Fixed typos in comment
8 years ago
Alex Kocharin
c57f593b23
Fix blockquote termination by list item
close https://github.com/markdown-it/markdown-it/issues/338
8 years ago
Alex Kocharin
7a053ef4c5
Fix tab behavior inside blockquotes
8 years ago
Alex Kocharin
18dd8e3a71
Fix list terminating paragraph shenanigans
8 years ago
Alex Kocharin
1ecf143db0
Fix lists and headings
8 years ago
Alex Kocharin
07cfbc9264
Add workarounds to lists to conform with CM spec
9 years ago
Alex Kocharin
b2aee1a978
Expand tabs only when it's needed, as per CommonMark 0.21
9 years ago
Alex Kocharin
909f79e62e
Bring ordered list markers up to spec
9 years ago
Alex Kocharin
954e156848
Allow numbered lists starting from zero
Fixes: https://github.com/markdown-it/markdown-it/issues/129
9 years ago
Vitaly Puzrin
3730820945
Added token helpers & reorganized renderer
10 years ago
Alex Kocharin
bb4dcf48f4
Set token.markup whereever appropriate
10 years ago
Alex Kocharin
4aabd5592e
Use a common class for tokens
10 years ago
Vitaly Puzrin
18efc864bd
Removed dead code in block rules & improved tests coverage
10 years ago
Alex Kocharin
a89d6758d7
Remove dead code in list.js
It was there because of the overly-defensive programming.
indentAfterMarker is set to 1 in line 159, it's never less than that
10 years ago
Vitaly Puzrin
e72603af70
Moved nesting check from rules to upper level
10 years ago
Vitaly Puzrin
a66e29f8d0
Place md link to states and remove other aliases
10 years ago
Vitaly Puzrin
671fd4f3ed
eslint rules & coding style update
10 years ago
Vitaly Puzrin
2b741deb18
Isolated rules management & rules cache build
10 years ago
Vitaly Puzrin
2ef8825a7f
Moved tight paragraphs marking to separate fn
10 years ago
Vitaly Puzrin
d5c588b130
Simplified loose/tight logic. Closes #50
10 years ago
Alex Kocharin
065eba8bda
Add "lines" attribute to all block-level tokens
(except for the closing ones)
10 years ago
Vitaly Puzrin
07a5bf5c7f
listMode -> parentType
10 years ago
Alex Kocharin
46402a32b4
Replace bqMarks logic with negative tShift
10 years ago
Vitaly Puzrin
5bd71f91a7
Moved state helpers to State* classes
10 years ago
Vitaly Puzrin
b27c630815
Code structure and options refactoring
10 years ago
Vitaly Puzrin
892460ed0b
Options rename
10 years ago
Alex Kocharin
9aea37acc1
Limit element depth
10 years ago
Vitaly Puzrin
7390503066
Moved rules manager to separate class (block parser only)
10 years ago
Alex Kocharin
0453b72bf1
Rename "lexer" to "parser"
and move rules from lexer_* to rules_*
10 years ago
Alex Kocharin
46dc1f93ac
Add state.level everywhere
10 years ago
Alex Kocharin
b3515881f3
Fix two consecutive newlines in nested lists
10 years ago
Alex Kocharin
1449ac720a
Remove stopOnTwoNewlines argument in block parser
Replaced with block.listMode (boolean)
10 years ago
Vitaly Puzrin
c384f13798
API & options names polish
10 years ago
Alex Kocharin
4f834e417d
Fix list continuation.
It should take indent into account:
---
- lev1
- lev2
- next
---
10 years ago
Alex Kocharin
e3a7ddf4a8
Blockquote parsing improved
10 years ago
Alex Kocharin
7a8899e501
Fix nested elements inside lists
"# foo" should be parsed as "h1", not as a continuation
---
- test
# foo
---
10 years ago
Alex Kocharin
d8fd23eb49
Fix nested code blocks inside lists
This is now parsed correctly:
---
- test
---
10 years ago
Vitaly Puzrin
9728b685ec
Rewritten string fetch for inline tokenizer + list fixes
10 years ago
Alex Kocharin
d6651b5ce6
Reimplement lists using indent algorithm
And put blkIndents everywhere appropriate in block rules.
10 years ago
Alex Kocharin
60f36941fa
Better algorithm for parsing lists
10 years ago
Vitaly Puzrin
e0a153fe09
fences, heading, list fixes for stmd cases
10 years ago
Vitaly Puzrin
4aa169634f
Tight lists + shink start of strings in inline blocks
10 years ago
Alex Kocharin
1b60163ba3
Moved empty lines logic from rules to block parser
10 years ago
Vitaly Puzrin
65f096804a
list review & reorganize
10 years ago
Alex Kocharin
0393a77aee
Added lists and basic support for tables
10 years ago
Vitaly Puzrin
a8f9ea5b57
replaced jshint with eslint for better style check
10 years ago
Alex Kocharin
bb0175e194
Added bullet list stub
This is incomplete yet:
- one element per list only
- list item may contain only one paragraph
10 years ago