Vitaly Puzrin
e92e776411
Rewrite core to es6 modules
1 year ago
Chris Sewell
13829a2c7e
Remove spurious state attribute ( #937 )
* Remove spurious state attribute
As far as I can see, this attribute is no longer used?
* Update pathological.json
* Update test/pathological.json
1 year ago
Alex Kocharin
6325878f9f
Multiple refactors
removed unused and duplicated variables
3 years ago
Alex Kocharin
9ff460ef87
Drop a lot of extra code from blockquotes
1st iteration before the loop is exactly the same as a part of that loop
this effectively replaces:
```
do(0)
for (i = 1; i < x; i++) do(i)
```
with:
```
for (i = 0; i < x; i++) do(i)
```
3 years ago
Tobias Speicher
e6d1bfdee1
refactor: replace deprecated String.prototype.substr()
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
3 years ago
Alex Kocharin
1cd8a5143b
Fix tab preventing paragraph continuation in lists
close https://github.com/markdown-it/markdown-it/issues/830
3 years ago
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.
4 years ago
Taneli Hukkinen
e5986bb7cc
Always suffix indented code block with a newline
3 years ago
Alex Kocharin
0b14fa069f
Update CommonMark spec to 0.30
4 years ago
Taneli Hukkinen
cd5296f1e7
Fix table/list parsing ambiguity ( #767 )
4 years ago
Alex Kocharin
b56eeb01d9
Table with no columns is no longer a table
this is now just raw text:
```md
|
|
|
```
close https://github.com/markdown-it/markdown-it/issues/724
4 years ago
Alex Kocharin
75fe6e0c76
Fix tables inside lists indented with tabs
close https://github.com/markdown-it/markdown-it/issues/721
4 years ago
Alex Kocharin
9fe835bc12
Fix mappings for table rows
- `table`, `tbody`, `tr` now have mapping
- `th`, `td`, `inline` in tables do not have it
close https://github.com/markdown-it/markdown-it/issues/705
4 years ago
Alex Kocharin
3021a5207b
Bring pipe escape algorithm in tables closer to gfm
- table now doesn't deal with backticks at all
- `|` is considered escaped if and only if there is a `\` character immediately before it
- number of elements in the first row (thead) now must match second row (aligns) exactly
- no tbody if it would be empty
close https://github.com/markdown-it/markdown-it/issues/689
close https://github.com/markdown-it/markdown-it/pull/697
4 years ago
Vas Sudanagunta
6629917dec
Remove unnecessary calculation
4 years ago
Alex Kocharin
0b1699b034
Add missing line mapping for table rows
fix https://github.com/markdown-it/markdown-it/issues/705
4 years ago
Alex Kocharin
b3531c876e
Fix blockquotes
```
>>> foo
> bar
>>> baz
```
this is now a single blockquote as per spec
close https://github.com/markdown-it/markdown-it/issues/696
4 years ago
Alex Kocharin
a1c93811f8
Fix incorrect level recalculation in text_collapse
close #466
6 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
6 years ago
Alex Kocharin
254b776beb
Allow tildes in info string of a fence block with tilde marker
This is now allowed as per commonmark 0.29 spec:
~~~ js ~~~
console.log('hello, world!');
~~~
See also:
b7651e4f8b
6 years ago
Alex Kocharin
a733ffa8b6
Fix blockquote termination inside lists
close https://github.com/markdown-it/markdown-it/issues/386
7 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
f0e7e562ea
Fix blockquote termination inside indented lists
close https://github.com/markdown-it/markdown-it/issues/329
8 years ago
Alex Kocharin
d29f421927
Fix table indentation issues
close https://github.com/markdown-it/markdown-it/issues/325
reverts https://github.com/markdown-it/markdown-it/pull/224
8 years ago
Alex Kocharin
9eb2a26005
Fix backtick handling inside tables
Fix https://github.com/markdown-it/markdown-it/issues/303
8 years ago
Alex Kocharin
93544ee4bf
Fenced code block info string should not contain fence marker
Fix https://github.com/markdown-it/markdown-it/issues/301
8 years ago
Alex Kocharin
f5a06ec0b6
Make link/image/reference helpers overridable
8 years ago
Alex Kocharin
1bb254b879
Allow tabs inside GFM tables
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
e5696e5b36
Partially fix tabs inside code blocks
8 years ago
Sean Lang
10d6448b22
support tables with missing values
(and add supporting test case)
9 years ago
Alex Kocharin
07cfbc9264
Add workarounds to lists to conform with CM spec
9 years ago
Alex Kocharin
637c776ec5
Allow multiline setext headers
9 years ago
Alex Kocharin
a18ddc0223
Loosen table rules
1. allow one-column tables
2. allow mismatched column count
close https://github.com/markdown-it/markdown-it/issues/171
9 years ago
Alex Kocharin
b2aee1a978
Expand tabs only when it's needed, as per CommonMark 0.21
10 years ago
Alex Kocharin
02c04be9e5
Fix reference edge-case
10 years ago
Alex Kocharin
643d9f75a0
Implement new html block algorithm from 0.21
10 years ago
Alex Kocharin
909f79e62e
Bring ordered list markers up to spec
10 years ago
Alex Kocharin
954e156848
Allow numbered lists starting from zero
Fixes: https://github.com/markdown-it/markdown-it/issues/129
10 years ago
Alex Kocharin
86fd73fcba
Disallow empty reference labels
10 years ago
Alex Kocharin
c5ee94aaf6
Fix skipLastLF handling in getLines
fix #116
10 years ago
Alex Kocharin
d292f72b69
Add/fix indentation checking in blockquotes
fix #111
10 years ago
JT
ba16fad6a2
Don't split cells on pipe characters inside backticks.
Includes some relevant test cases.
Fixes #86
10 years ago
Vitaly Puzrin
d4fe12a6ec
Fixed html block tags with numbers in name, closes #74
10 years ago
Alex Kocharin
77e8b6cad0
Add configurable url normalizers
- md.normalizeLink
- md.normalizeLinkText
10 years ago
Alex Kocharin
f1aff8a5b9
Add StateCore.Token and StateCore.push()
so all state objects would have roughly the same interface
10 years ago
Alex Kocharin
5a390adbbc
Make Token class accessible from a State
10 years ago