3980 Commits
Author SHA1 Message Date
simple-mindedandGeneralTony007 fe0d3496e9 fix: preserve Unicode whitespace in inline link destinations (#4249)
* fix: preserve Unicode whitespace in inline link destinations

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

* fix: preserve Unicode whitespace in inline link destinations

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

* fix: preserve Unicode whitespace in inline link destinations

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

* test: migrate reviewed regression to native fixture

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

* test: migrate reviewed regression to native fixture

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

* test: migrate reviewed regression to native fixture

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

* test: migrate reviewed regression to native fixture

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

* test: remove superseded regression after native fixture migration

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

* test: remove superseded regression after native fixture migration

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

* test: remove unrelated ASCII-tab link destination fixture

Remove the input identified in review. The existing parser mismatch is outside this Unicode-whitespace change; the corresponding expected output is removed in the companion commit.

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

* test: align link destination output with removed ASCII-tab case

Remove only the expected output corresponding to the reviewed ASCII-tab input. Unicode cases remain unchanged; this does not fix the separate parser mismatch. Full local npm test passed: 2039 specs and 256 unit tests.

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

---------

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>
2026-11-27 15:18:02 -07:00
奶油芝士脆脆鲨 f3bfaf6699 fix: normalize line endings for inline parsing (#4283)
Prepared with Codex assistance.
2026-11-27 11:49:24 -07:00
Ragib MRB dd9fbbe8e4 fix: keep --option=value values attached to their option and check own defaults in CLI (#4265) 2026-11-27 09:14:27 -07:00
FFspiky 393e1dc2ac fix: strip indentation from tilde fence contents (#4281) 2026-11-25 14:11:37 -07:00
Lê Văn Xuân Hoàn 8e298c1d2f fix: preserve literal entities in image alt autolinks (#4275) 2026-11-25 13:27:29 -07:00
semantic-release-bot 5c0869f8ab chore(release): 18.3.0 [skip ci]
# [18.3.0](https://github.com/markedjs/marked/compare/v18.2.1...v18.3.0) (2026-11-24)

### Bug Fixes

* allow trailing tabs after closing code fences ([#4241](https://github.com/markedjs/marked/issues/4241)) ([1e11902](https://github.com/markedjs/marked/commit/1e1190241b4a8f16d6bfa232e183f581eb617964))
* avoid quadratic scan on adjacent inline links ([#4274](https://github.com/markedjs/marked/issues/4274)) ([f5ffd22](https://github.com/markedjs/marked/commit/f5ffd221ba5fc7f077d867ac2fc3f7a06855da94))
* avoid quadratic time on long local part before @ in GFM text ([#4225](https://github.com/markedjs/marked/issues/4225)) ([c6b22e8](https://github.com/markedjs/marked/commit/c6b22e89baca9dfa4ed074380a511781e1c35e4a))
* check own properties on extensions.renderers in Parser ([#4271](https://github.com/markedjs/marked/issues/4271)) ([c572307](https://github.com/markedjs/marked/commit/c57230757e32a2b27c4bc75b1274b25e379fd465))
* honor the CLI end-of-options marker ([#4230](https://github.com/markedjs/marked/issues/4230)) ([a1ddc72](https://github.com/markedjs/marked/commit/a1ddc722e797b8315a56ea2ab66043da294364af))
* keep an indented code block after a list item paragraph ([#4198](https://github.com/markedjs/marked/issues/4198)) ([b9e3824](https://github.com/markedjs/marked/commit/b9e3824233a381aa476ae9a9d9c4827fb25c601c))
* preserve literal entities in image alt text ([#4232](https://github.com/markedjs/marked/issues/4232)) ([04f1c6e](https://github.com/markedjs/marked/commit/04f1c6e5189076d38b00d41acf9bff235532123a))
* reject CLI options missing their values ([#4261](https://github.com/markedjs/marked/issues/4261)) ([502e658](https://github.com/markedjs/marked/commit/502e658115a8db1aec6157c2560cde913b78c4f6))
* skip missing optional childTokens properties in walkTokens ([#4262](https://github.com/markedjs/marked/issues/4262)) ([283f74f](https://github.com/markedjs/marked/commit/283f74f24bc6df1c39c4b2a74ef923a68752e6e5))
* wait for CLI error output before exiting ([#4263](https://github.com/markedjs/marked/issues/4263)) ([6c2a5ab](https://github.com/markedjs/marked/commit/6c2a5ab48d475d66adb19d2909929a6447130c52))

### Features

* add inBlockquote to lexer state ([#4222](https://github.com/markedjs/marked/issues/4222)) ([201bfce](https://github.com/markedjs/marked/commit/201bfce495e6e57be6f2c91e822e65f33a546040)), closes [#4184](https://github.com/markedjs/marked/issues/4184) [#4221](https://github.com/markedjs/marked/issues/4221)

### Performance Improvements

* avoid scanning table bodies for header-only decisions ([#4213](https://github.com/markedjs/marked/issues/4213)) ([a0925cc](https://github.com/markedjs/marked/commit/a0925cca0227082e83feb2461115fbef1a30ecca))
* skip paragraph lookahead for initial quoted code ([#4233](https://github.com/markedjs/marked/issues/4233)) ([171f177](https://github.com/markedjs/marked/commit/171f177a42f09d4812c68b045c3bb50122f6b2aa))
v18.3.0
2026-11-24 02:51:15 +00:00
Tony Brix 82c0185114 chore: npm audit fix (#4280) 2026-11-23 19:49:55 -07:00
Taha Ahmed 201bfce495 feat: add inBlockquote to lexer state (#4222)
* fix: measure tabs after a block quote marker from the start of the line

- Expand tabs in block quote markers and the indentation after them with tab stops from the start of the line, nested markers included
- Keep tabs literal inside fenced code in a block quote (#4184)
- Keep the old handling inside list items, where the marker's column is unknown

Fixes #4221

* fix: keep the existing tab handling from a list item in a block quote on

- Return lines as written from the first list item on, since its columns and fences are not tracked
- Expand columns only in the outermost block quote, including the nested continuation path
- Add exact and structural specs for a fence and a lazy line in a list item under a block quote
2026-11-23 18:42:42 -07:00
Ragib MRB c57230757e fix: check own properties on extensions.renderers in Parser (#4271) 2026-11-23 18:21:05 -07:00
Ragib MRB 283f74f24b fix: skip missing optional childTokens properties in walkTokens (#4262) 2026-11-22 23:31:24 -07:00
Umut f5ffd221ba fix: avoid quadratic scan on adjacent inline links (#4274) 2026-11-22 22:26:15 -07:00
Baksi b20f69f2b4 docs: list Inline Annotation under Known Extensions (#4256)
* docs: list Inline Annotation under known extensions

* Keep the extension table alphabetized
2026-11-21 23:47:25 -07:00
Zhenxian Liangand梁镇贤 6c2a5ab48d fix: wait for CLI error output before exiting (#4263)
Co-authored-by: 梁镇贤 <251972984+xiaoyao-666-coder@users.noreply.github.com>
2026-11-20 19:20:48 -07:00
Ragib MRB 502e658115 fix: reject CLI options missing their values (#4261) 2026-11-20 00:44:08 -07:00
generaltony007andGeneralTony007 1e1190241b fix: allow trailing tabs after closing code fences (#4241)
* fix: allow trailing tabs after closing code fences

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

* fix: allow trailing tabs after closing code fences

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

* fix: allow trailing tabs after closing code fences

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

* fix: allow trailing tabs after closing code fences

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

* fix: allow trailing tabs after closing code fences

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

* test: remove duplicate CommonMark fence output

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

* test: remove duplicate CommonMark fence input

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

---------

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>
2026-11-19 00:06:06 -07:00
generaltony007andGeneralTony007 04f1c6e518 fix: preserve literal entities in image alt text (#4232)
* fix: preserve literal entities in image alt text

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

* test: cover image literal entities and text renderer compatibility

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

* test: add image alt literal entity inputs

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

* test: assert literal entity image alt output

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

---------

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>
2026-11-17 08:38:15 -07:00
generaltony007andGeneralTony007 171f177a42 perf: skip paragraph lookahead for initial quoted code (#4233)
* fix: skip paragraph lookahead for initial quoted code

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

* test: preserve quoted paragraph continuation boundary

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

* test: cover alternating indented code and quoted code

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

---------

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>
2026-11-17 08:37:23 -07:00
generaltony007andGeneralTony007 a1ddc722e7 fix: honor the CLI end-of-options marker (#4230)
* fix: honor the CLI end-of-options marker

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

* test: cover hyphen-prefixed input files after --

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

* docs: document the CLI option terminator

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

---------

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>
2026-11-17 08:24:41 -07:00
Gss c6b22e89ba fix: avoid quadratic time on long local part before @ in GFM text (#4225) 2026-11-16 11:20:08 -07:00
Jay Hemnani b9e3824233 fix: keep an indented code block after a list item paragraph (#4198)
* fix: keep an indented code block after a list item paragraph

In a list item, a paragraph line indented four or more spaces is lexed
as indented code and then merged back into the paragraph. The code
token also ran across the following blank line, so a real indented
code block after it was merged into the paragraph too.

* fix: continue list item text over indented lines in the text tokenizer
2026-11-16 11:03:07 -07:00
generaltony007andgeneraltony007 a0925cca02 perf: avoid scanning table bodies for header-only decisions (#4213)
* perf: reject mismatched table headers before scanning body rows

Co-authored-by: generaltony007 <144252170+GeneralTony007@users.noreply.github.com>

* perf: share header-only GFM table lookahead

Co-authored-by: generaltony007 <144252170+GeneralTony007@users.noreply.github.com>

* test: cover table header rejection before body matching

Co-authored-by: generaltony007 <144252170+GeneralTony007@users.noreply.github.com>

---------

Co-authored-by: generaltony007 <144252170+GeneralTony007@users.noreply.github.com>
2026-11-16 10:53:17 -07:00
semantic-release-bot 73d5116de4 chore(release): 18.2.1 [skip ci]
## [18.2.1](https://github.com/markedjs/marked/compare/v18.2.0...v18.2.1) (2026-11-16)

### Bug Fixes

* allow tabs between the tag name and attributes of an html block ([#4207](https://github.com/markedjs/marked/issues/4207)) ([738ebeb](https://github.com/markedjs/marked/commit/738ebebc835ebc97fe82e3321bc7f91f638c531f))
* **cli:** wait for stdout before exiting ([#4197](https://github.com/markedjs/marked/issues/4197)) ([b535046](https://github.com/markedjs/marked/commit/b535046bf59cbe488be4354f02d56b1a1bb6fdaa))
* continue a block quote paragraph with a lazy line that starts an html tag ([#4202](https://github.com/markedjs/marked/issues/4202)) ([8a578e4](https://github.com/markedjs/marked/commit/8a578e4c0c7e1c650a6bad82254d30b0d377c730))
* end a block quote at a lazy line after an empty list item ([#4178](https://github.com/markedjs/marked/issues/4178)) ([e2f77b4](https://github.com/markedjs/marked/commit/e2f77b4b72ccaefeb99fc74df2bfd7016636c3b2))
* end a list item before a lazy line after an empty or non-paragraph nested block ([#4183](https://github.com/markedjs/marked/issues/4183)) ([ac2256e](https://github.com/markedjs/marked/commit/ac2256e1130957341831a8308f73720ede7e6095))
* Fix bracket escapes inside code spans in link text being stripped ([#4205](https://github.com/markedjs/marked/issues/4205)) ([9a26ae9](https://github.com/markedjs/marked/commit/9a26ae9ceeb26f79f35a03ec910f996147087ef8)), closes [#4176](https://github.com/markedjs/marked/issues/4176) [#4176](https://github.com/markedjs/marked/issues/4176) [#4176](https://github.com/markedjs/marked/issues/4176)
* keep a tab after the block quote marker's space literal ([#4208](https://github.com/markedjs/marked/issues/4208)) ([2d3b47f](https://github.com/markedjs/marked/commit/2d3b47fa217a06f9a360d86ebf0f766d19949621))
* keep rejected table candidates in the preceding paragraph ([#4218](https://github.com/markedjs/marked/issues/4218)) ([1c5969e](https://github.com/markedjs/marked/commit/1c5969e395905fa3f33f3a847d8ad655f1dfcce7))
* keep tabs that are code content under a block quote ([#4217](https://github.com/markedjs/marked/issues/4217)) ([d2c6f73](https://github.com/markedjs/marked/commit/d2c6f736f339b4739a16426c681528ca210a6e87)), closes [#4184](https://github.com/markedjs/marked/issues/4184)
* let a mid-run opener close against a delimiter that can also open ([#4203](https://github.com/markedjs/marked/issues/4203)) ([06e1d10](https://github.com/markedjs/marked/commit/06e1d1090338b76c3d458a26d52ee67f72c8d6e1))
* let an autolink or inline html line start or continue a setext heading ([#4191](https://github.com/markedjs/marked/issues/4191)) ([72d0fec](https://github.com/markedjs/marked/commit/72d0fec9b59a12c5446b9377cf4363a2794ce54b))
* parse links generated by inline tokenizers ([#4204](https://github.com/markedjs/marked/issues/4204)) ([0460f98](https://github.com/markedjs/marked/commit/0460f98b7e2a1dfedf40eccddaa8d8ada1731d2a))
* preserve trailing blank lines in fenced code ([#4200](https://github.com/markedjs/marked/issues/4200)) ([7499eb3](https://github.com/markedjs/marked/commit/7499eb3a23eb29c0e9d2ffde551b92439a9b3af6))
* reject a link destination in angle brackets with an unescaped < or > ([#4206](https://github.com/markedjs/marked/issues/4206)) ([de71210](https://github.com/markedjs/marked/commit/de71210d4204745b326d2e8357240f7a350221f8))
* remove a task item's checkbox marker from its own text ([#4215](https://github.com/markedjs/marked/issues/4215)) ([5902442](https://github.com/markedjs/marked/commit/59024421a4ce874168d3f551565f4ebad121f5af))
* **types:** preserve custom output types in tokenizer overrides ([#4214](https://github.com/markedjs/marked/issues/4214)) ([5e35708](https://github.com/markedjs/marked/commit/5e35708f3f4a88d477c37c2d42ad86907d6b4daf))

### Performance Improvements

* check the first character before inline tokenizer regexes ([#4193](https://github.com/markedjs/marked/issues/4193)) ([95ccf6c](https://github.com/markedjs/marked/commit/95ccf6c186a38e092dfb666d68f70cfcd89c53a5))
* close residual O(n²) parse time on unmatched emphasis/strikethrough delimiter runs (follow-up to [#4099](https://github.com/markedjs/marked/issues/4099) / [#4103](https://github.com/markedjs/marked/issues/4103)) ([#4196](https://github.com/markedjs/marked/issues/4196)) ([0b8b3b3](https://github.com/markedjs/marked/commit/0b8b3b33863822681a1cb5a365baec684c368230))
* skip the emphasis closer scan for inline runs without a delimiter ([#4195](https://github.com/markedjs/marked/issues/4195)) ([ffa06d5](https://github.com/markedjs/marked/commit/ffa06d52ce67f952e0c50ccc7371f50cfe27cfc6))
v18.2.1
2026-11-16 17:20:37 +00:00
Tony Brix b4eeb40b54 chore: update deps (#4228) 2026-11-16 10:18:07 -07:00
dependabot[bot] 5fb062a257 chore(deps-dev): bump dts-bundle-generator from 9.5.1 to 10.0.0 (#4226)
Bumps [dts-bundle-generator](https://github.com/timocov/dts-bundle-generator) from 9.5.1 to 10.0.0.
- [Release notes](https://github.com/timocov/dts-bundle-generator/releases)
- [Commits](https://github.com/timocov/dts-bundle-generator/compare/v9.5.1...v10.0.0)

---
updated-dependencies:
- dependency-name: dts-bundle-generator
  dependency-version: 10.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-16 10:02:05 -07:00
dependabot[bot] 0287341c94 chore(deps-dev): bump @semantic-release/github from 12.0.10 to 12.0.11 (#4227)
Bumps [@semantic-release/github](https://github.com/semantic-release/github) from 12.0.10 to 12.0.11.
- [Release notes](https://github.com/semantic-release/github/releases)
- [Commits](https://github.com/semantic-release/github/compare/v12.0.10...v12.0.11)

---
updated-dependencies:
- dependency-name: "@semantic-release/github"
  dependency-version: 12.0.11
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-16 09:36:46 -07:00
generaltony007andGeneralTony007 1c5969e395 fix: keep rejected table candidates in the preceding paragraph (#4218)
* fix: keep rejected table candidates in the preceding paragraph

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

* test: preserve inline queue and custom paragraph tokenizers

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

* test: cover rejected GFM table candidates and valid controls

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

* test: record reference HTML for rejected table continuation

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>

---------

Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>
2026-11-16 09:34:42 -07:00
kevin d2c6f736f3 fix: keep tabs that are code content under a block quote (#4217)
* fix: keep tabs that are code content under a block quote

After ">", an optional space is part of the marker; tabs after that
space belong to the line content (e.g. fenced code) and must not be
expanded. Tabs with no leading space are still expanded so indented
code under a quote keeps working.

Fixes #4184

* test: move the block quote tab case to a renderExact spec
2026-11-16 09:33:49 -07:00
Afonso Ribeiro 59024421a4 fix: remove a task item's checkbox marker from its own text (#4215) 2026-11-16 09:32:48 -07:00
generaltony007andgeneraltony007 5e35708f3f fix(types): preserve custom output types in tokenizer overrides (#4214)
* fix(types): preserve custom output types in tokenizer overrides

Co-authored-by: generaltony007 <144252170+GeneralTony007@users.noreply.github.com>

* test(types): cover generic tokenizer context and string defaults

Co-authored-by: generaltony007 <144252170+GeneralTony007@users.noreply.github.com>

---------

Co-authored-by: generaltony007 <144252170+GeneralTony007@users.noreply.github.com>
2026-11-16 09:31:17 -07:00
yash de71210d42 fix: reject a link destination in angle brackets with an unescaped < or > (#4206) 2026-11-16 09:29:19 -07:00
奶油芝士脆脆鲨 0460f98b7e fix: parse links generated by inline tokenizers (#4204) 2026-11-16 09:28:27 -07:00
yash 06e1d10903 fix: let a mid-run opener close against a delimiter that can also open (#4203) 2026-11-16 09:27:25 -07:00
lfhwnqe 7499eb3a23 fix: preserve trailing blank lines in fenced code (#4200) 2026-11-16 09:26:02 -07:00
Panda Xiongandpandaxiong0729 b535046bf5 fix(cli): wait for stdout before exiting (#4197)
Co-authored-by: pandaxiong0729 <239575197+pandaxiong0729@users.noreply.github.com>
2026-11-16 09:25:08 -07:00
Wei-Lun Li ffa06d52ce perf: skip the emphasis closer scan for inline runs without a delimiter (#4195) 2026-11-16 09:24:33 -07:00
Gal Be 95ccf6c186 perf: check the first character before inline tokenizer regexes (#4193) 2026-11-16 09:23:41 -07:00
Alperen Manas 72d0fec9b5 fix: let an autolink or inline html line start or continue a setext heading (#4191) 2026-11-16 09:22:40 -07:00
Wei-Lun LiandClaude Opus 5.5 e2f77b4b72 fix: end a block quote at a lazy line after an empty list item (#4178)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 09:20:44 -07:00
Vadim Toptunov 0b8b3b3386 perf: close residual O(n²) parse time on unmatched emphasis/strikethrough delimiter runs (follow-up to #4099 / #4103) (#4196)
* perf: skip dead emphasis/strikethrough delim runs in inline pass

Follow-up to #4099 / #4103. When an input line contains a long run of `*`,
`_` or `~` with no closer anywhere ahead in maskedSrc, every opener
position in Tokenizer.emStrong / Tokenizer.del was correctly early-returning
via the lastPossibleCloserIndex guard introduced by #4103, but the outer
inline loop still advanced one character at a time through the run. The
`^\*+` greedy anchor in emStrongLDelim re-scans the whole run on each
call, so the inline pass remains O(n^2) even though the inner closer scan
is now O(1).

Measured on master before this change:

```
**` x 20000 + 'x'   8.73 s
__` x 20000 + 'x'  11.30 s
*`  x 40000 + 'x'   8.73 s
_`  x 40000 + 'x'  11.30 s
```

With this change the same inputs render in ~0.001 s. The CommonMark
spec test suite (1983 cases) and the project's unit tests (242 cases)
continue to pass. A new fixture `em_strong_unmatched_delim_run`
documents the behavior for closer-less `*`, `_`, and `~` runs.

The fix checks the cached last-possible-closer index that #4103
already maintains; when no closer exists after the current position,
the entire run of same-delim characters is consumed as literal text in
one step. Behavior is unchanged (runs without a closer have always
rendered as literal text); only the time to reach that result changes.

* test(redos): regression test for closer-less delimiter run quadratic

Mirrors the quadratic_em_mask.cjs / quadratic_br.cjs style. Each of the
four cases fails on 18.1.3 baseline (times out around 2.3-3.0s per case
in test:specs) and passes in 5-7ms with the fix.

- '**' x 10000 + 'x' -> <p>**...**x</p>
- '__' x 10000 + 'x' -> <p>__...__x</p>
- '*'  x 20000 + 'x' -> <p>*...*x</p>
- '_'  x 20000 + 'x' -> <p>_..._x</p>

Requested by @UziTech in review of #4196.
2026-11-16 09:11:21 -07:00
Ragib MRB 81592c3fdd docs: sync renderer and tokenizer lists and example output with current API (#4224) 2026-11-16 00:12:35 -07:00
generaltony007andgeneraltony007 9a26ae9cee fix: Fix bracket escapes inside code spans in link text being stripped (#4205)
* Fix bracket escapes inside code spans in link text being stripped

The link label matcher consumes backslash-escaped brackets, and outputLink then removes those escapes from the label text. It did so over the whole label, so a backslash-escaped bracket inside a code span also lost its backslash even though code span content is literal: [`\]`] rendered <code>]</code> instead of <code>\]</code>.

Scan the label and copy code spans through verbatim, unescaping brackets only outside of them.

Refs #4176

Co-authored-by: generaltony007 <144252170+GeneralTony007@users.noreply.github.com>

* Add spec tests for bracket escapes in link text code spans

Refs #4176

Co-authored-by: generaltony007 <144252170+GeneralTony007@users.noreply.github.com>

* Add expected HTML for bracket escapes in link text code spans

Refs #4176

Co-authored-by: generaltony007 <144252170+GeneralTony007@users.noreply.github.com>

---------

Co-authored-by: generaltony007 <144252170+GeneralTony007@users.noreply.github.com>
2026-11-13 11:22:38 -07:00
Alperen Manas ac2256e113 fix: end a list item before a lazy line after an empty or non-paragraph nested block (#4183) 2026-11-13 11:21:00 -07:00
yash 8a578e4c0c fix: continue a block quote paragraph with a lazy line that starts an html tag (#4202)
* fix: continue a block quote paragraph with a lazy line that starts an html tag

A lazy continuation line in a block quote that is only an html tag, like
`</span>` or `<a href="bar">`, was lexed as an html block, which ended the
paragraph. An html block of type 7 cannot interrupt a paragraph, so the
line continues the paragraph, as in CommonMark.

* refactor: move the lazy html paragraph check to the tokenizer
2026-11-13 11:19:55 -07:00
yash 738ebebc83 fix: allow tabs between the tag name and attributes of an html block (#4207) 2026-11-10 21:13:02 -07:00
Aarav Guptaandusesprocket[bot] 2d3b47fa21 fix: keep a tab after the block quote marker's space literal (#4208)
Co-authored-by: usesprocket[bot] <306702232+usesprocket[bot]@users.noreply.github.com>
2026-11-10 21:11:38 -07:00
NingLin Liu 1ae2ac9d7f docs: fix typo in demo comment (#4220) 2026-11-10 21:09:29 -07:00
semantic-release-bot afba4543ff chore(release): 18.2.0 [skip ci]
# [18.2.0](https://github.com/markedjs/marked/compare/v18.1.3...v18.2.0) (2026-11-09)

### Bug Fixes

* keep hard line breaks in image alt text ([#4187](https://github.com/markedjs/marked/issues/4187)) ([ed54c54](https://github.com/markedjs/marked/commit/ed54c541ef75740634a09233c685a5bba1e92944))
* let emphasis open after the other delimiter character ([#4169](https://github.com/markedjs/marked/issues/4169)) ([219492a](https://github.com/markedjs/marked/commit/219492a64e5cd0a7f264678b7a80bdd2201c970b))
* let emphasis open and close in angle brackets that are not html ([#4190](https://github.com/markedjs/marked/issues/4190)) ([7bfa1f7](https://github.com/markedjs/marked/commit/7bfa1f70e8756c6ee3e47c235a34556edbf48b49))
* preserve zero from named extension renderers ([#4199](https://github.com/markedjs/marked/issues/4199)) ([b81a00a](https://github.com/markedjs/marked/commit/b81a00a2e332a47e0ccc0ff376babfe78392f321))
* text after a heading or code block in a nested list item is pulled into the outer item ([#4179](https://github.com/markedjs/marked/issues/4179)) ([4cb767a](https://github.com/markedjs/marked/commit/4cb767a966b496eb74cb2779ff2b8d0054a2a035))

### Features

* add lastToken to lexer state ([#4160](https://github.com/markedjs/marked/issues/4160)) ([e4ab77f](https://github.com/markedjs/marked/commit/e4ab77f6e46d478cfed8697c308dddc60b9ddf99))
v18.2.0
2026-11-09 23:04:37 +00:00
dependabot[bot] 7220efa927 chore(deps-dev): bump rimraf from 6.1.3 to 6.1.4 (#4212)
Bumps [rimraf](https://github.com/isaacs/rimraf) from 6.1.3 to 6.1.4.
- [Changelog](https://github.com/isaacs/rimraf/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/rimraf/compare/v6.1.3...v6.1.4)

---
updated-dependencies:
- dependency-name: rimraf
  dependency-version: 6.1.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-09 16:02:16 -07:00
dependabot[bot] 6fd880c310 chore(deps-dev): bump tslib from 2.8.1 to 2.9.1 (#4211)
Bumps [tslib](https://github.com/Microsoft/tslib) from 2.8.1 to 2.9.1.
- [Release notes](https://github.com/Microsoft/tslib/releases)
- [Commits](https://github.com/Microsoft/tslib/compare/v2.8.1...v2.9.1)

---
updated-dependencies:
- dependency-name: tslib
  dependency-version: 2.9.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-09 16:02:02 -07:00
Aryapatel-007andClaude Opus 5.5 8ac3e2089a docs: list --version in the man page and fix --no- option spelling (#4192)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 15:42:41 -07:00