248 Commits

Author SHA1 Message Date
Tony Brix
9ae87de7cb
fix: fix table rendered as heading (#3612)
* add tests

* add table interrupt to lheading

* fix comment

* fix redos in rule
2025-02-09 16:12:21 -07:00
Tony Brix
7712a5324f
fix: fix strikethrough inside strong and em to follow gfm (#3577)
* fix: fix strikethrough inside strong and em to follow gfm

* add both sides tests
2025-01-06 08:50:34 -07:00
Tony Brix
8a01658cac
fix: allow strikethrough inside strong and em to follow gfm (#3569) 2025-01-02 08:34:55 -07:00
Spencer Whitehead
bd22323c09
chore: fix update-specs script, use builtin fetch (#3528) 2024-11-09 11:40:25 -07:00
Tony Brix
0afe87d7fb
fix: fix del with escaped tilde (#3517)
* fix: fix del with escaped tilde

* use rules to check for unescaped tilde

* add tests with spaces
2024-11-07 10:23:40 -07:00
Tony Brix
a612576ff6
fix: fix html comment after list (#3518) 2024-11-07 10:22:52 -07:00
Tony Brix
2b7efa8dda
fix: include single nested parens in emStrong link mask (#3475) 2024-10-14 22:24:34 -06:00
Tony Brix
9d7b728749
fix: fix html following list (#3444) 2024-09-08 09:25:54 -06:00
Tony Brix
9ed6456a37
fix: Don't replace tabs with spaces (#3438)
* fix: don't convert tabs to spaces

* test exact

* save nextLineWithoutTabs

* fix code
2024-09-03 18:06:32 -06:00
Tony Brix
9b02e477c6
chore: consolidate eslint rules (#3368) 2024-07-14 18:54:46 -06:00
Tony Brix
62b941d417
chore: update eslint to v9 (#3367)
* chore: update eslint to v9

* remove compat

* pin typescript
2024-07-14 00:38:17 -06:00
Tony Brix
d28e4c65ea
fix: fix list item with blank first line (#3351)
* fix: fix list item with blank first line

* move blankline
2024-07-03 17:04:17 -07:00
Tony Brix
7ab818502e
fix: blockquote code continuation (#3264)
BREAKING CHANGE: add space token after blockquote and hr if there are multiple newlines
2024-06-11 23:53:43 -06:00
Tony Brix
e9f0eed707
fix: fix Setext continuation in blockquote (#3257) 2024-04-18 23:06:58 -06:00
Tony Brix
d848445072
fix: fix setext heading interupts (#3210) 2024-03-06 00:37:00 -07:00
Tony Brix
3d9017bb8e
fix: update to commonmark specs 0.31 (#3176)
BREAKING CHANGE:

- Update HTML block tags: add search, remove source
- Update punctuation to include unicode punctuation and symbol categories
- Update HTML comment to include <!--> and <!--->
2024-02-03 08:21:29 -08:00
Tony Brix
014d4e61f6
fix: run spec tests with testutils (#3017)
BREAKING CHANGE: drop support for node v16
2023-11-10 22:49:27 -07:00
Tony Brix
54b6d1c47d
fix: fix emstrong unicode (#3070) 2023-11-01 22:27:17 -06:00
Tony Brix
a1034e6dd1
fix: fix empty heading breaks paragraph and table (#3050) 2023-10-27 23:10:35 -06:00
Susheel Thapa
7403ec0779
Chore: Typo fixed in multiple files (#3045)
Co-authored-by: Tony Brix <tony@brix.ninja>
2023-10-16 23:28:19 -06:00
Tony Brix
8ebbb3c3d4
fix: fix unicode emstrong (#2989) 2023-09-16 17:24:06 -06:00
Tony Brix
bcc3067087
fix: fix unexpected setext heading (#2986) 2023-09-15 13:22:12 -06:00
Tony Brix
0743d4adb4
fix: single column table (#2985) 2023-09-15 13:21:58 -06:00
Tony Brix
22ebdb2507
fix: remove deprecated options (#2936)
BREAKING CHANGE: deprecated options removed. See https://marked.js.org/using_advanced#options to see how to enable the removed options with extensions.
2023-09-02 22:02:24 -06:00
Trevor Buckner
f3af23ec98
fix: Fix unicode Regex miscounting emoji length (#2942)
Many emojis are 2+ unicode bytes long. The \u tag which allows searching for punctuation also counts emojis as single chars. Slicing the strings into an array restores the correct character count.
2023-08-14 18:14:55 -06:00
Tony Brix
63a839b8cb
fix: change defaults for mangle and headerIds to false (#2890)
BREAKING CHANGE: change defaults for mangle and headerIds to false
2023-08-06 17:48:30 -06:00
Tony Brix
353e13b479
feat: add Marked instance (#2831)
Co-authored-by: Steven <steven@ceriously.com>
2023-06-09 22:10:12 -05:00
Trevor Buckner
f879a23e1b
fix: Fix more Escape conflicts (#2838) 2023-06-06 23:17:52 -05:00
azmy60
b213f02e43
fix: Add Unicode punctuations (#2811) 2023-05-30 17:22:33 -05:00
azmy60
efc40dfb05
fix: fix hr after list (#2809) 2023-05-30 17:21:29 -05:00
Tony Brix
a37fe8e82b
fix: fix quadratic execution in em mask (#2818)
* fix: fix redos in em mask

* also remove (
2023-05-26 11:50:39 -05:00
Tony Brix
3acbb7f9ab
fix: fenced code doesn't need a trailing newline (#2756)
* fix: fenced code doesn't need a trailing newline

* build marked for demo

* clean up
2023-03-21 19:50:28 -05:00
Tony Brix
e692634f70
fix: fix tabs at beginning of list items (#2679)
* fix: fix tabs at beginning of list items

* test: add test for ordered list
2022-12-23 09:39:10 -06:00
Tony Brix
1bbda688f5
fix: fix paragraph continuation after block element (#2686) 2022-12-23 09:38:51 -06:00
Tony Brix
697ac2a42e
fix: remove quotes at the end of gfm autolink (#2673)
Fixes undefined
2022-12-07 01:44:55 -06:00
Tony Brix
df4eb0e090
fix: loose list items are loose (#2672) 2022-12-07 01:44:35 -06:00
Tony Brix
4aee878ac9
fix: fix multiline setext headings (#2655) 2022-11-20 10:06:04 -06:00
Tony Brix
b7eea9504b
fix: fix link reference definitions specs (#2654) 2022-11-20 10:05:52 -06:00
Tony Brix
36a2b639dc
fix: fix entity specs (#2652) 2022-11-20 10:05:26 -06:00
Tony Brix
44a2a2393c
fix: fix escape characters in links (#2628)
* fix: fix escape characters in links

* chore: remove escapes in def

* chore: fix lang replace on undefined
2022-11-04 19:40:34 -05:00
Richard Gibson
377823a6f5
fix: Support escapes within emphasis (#2627)
* fix: Support escapes within emphasis

...particularly right at the end.

Fixes #2280

* chore: realign comments with regexp alternatives

* test: Add HTML test for escapes within emphasis

* fix: Correct recognition and masking of escaped emphasis punctuation

* fix: Correct backslash fake-lookbehind
2022-11-01 21:03:58 -05:00
Tony Brix
01c98d1c4e
fix: fix heading in list item (#2520)
fix: fix heading in code in list item
2022-07-11 10:12:57 -05:00
Kiyoka Nishiyama
15f3f157de
fix: Code and heading after list without blank line (#2483) 2022-06-12 22:15:06 -05:00
Tony Brix
81daa2ae47
fix: fix ref links inside table (#2471) 2022-05-17 09:28:47 -04:00
Kim, Jang-hwan
9c10b4d68f
fix: list item bullet without whitespace (#2431) 2022-05-02 01:12:30 -05:00
rossipedia
7d19665167
fix: only convert leading tabs to spaces (#1559) (#2434)
* fix: non leading-tabs in markdown content (#1559)

Only replaces tabs at the beginning of a block construct. Tabs in the
middle of the item are unaffected.

All tests passing. Tabs in both GFM and CommonMark at 100%

fixes #1559

* update new/html_comments.html to preserve tab

* combine redundant if condition

* add test for tab immediately after blockquote character
2022-04-10 19:37:04 -05:00
Zach Bialecki
ed66bf8abd
Add check in splitCells to prevent calling trim on undefined (#2372) 2022-01-26 22:07:01 -06:00
Tony Brix
6e1f9235dc
fix: fix blank line after table header (#2332) 2022-01-26 15:51:00 -06:00
Tony Brix
c4a3ccd344
Merge pull request from GHSA-rrrm-qjm4-v8hf
* fix: fix reflink redos

Co-authored-by: MakeNowJust <make.just.on@gmail.com>

* fix: fix def redos

Co-authored-by: MakeNowJust <make.just.on@gmail.com>

* fix block label for multiple slashes

Co-authored-by: MakeNowJust <make.just.on@gmail.com>
2022-01-12 19:53:48 -06:00
Chell
f82ea2cf1b
fix: spaces on a newline after a table (#2319)
* fix: rename inconsistent function

* fix: newline with 1~4 spaces below table

* fix: format html test

* fix: specify spaces only

* fix: specify spaces only

* fix: detect tab

* fix: detect tab

* fix: newline at the end of html
2021-12-18 18:21:22 -06:00