Compare commits

...

75 Commits

Author SHA1 Message Date
semantic-release-bot
b4eb83bbb4 chore(release): 15.0.12 [skip ci]
## [15.0.12](https://github.com/markedjs/marked/compare/v15.0.11...v15.0.12) (2025-05-20)

### Bug Fixes

* use esbuild for accurate sourcemaps ([#3670](https://github.com/markedjs/marked/issues/3670)) ([7a6b2d7](7a6b2d7191))
2025-05-20 05:03:06 +00:00
Tony Brix
7a6b2d7191
fix: use esbuild for accurate sourcemaps (#3670) 2025-05-19 22:57:27 -06:00
dependabot[bot]
9b8b1117ba
chore(deps-dev): Bump semantic-release from 24.2.3 to 24.2.4 (#3690)
Bumps [semantic-release](https://github.com/semantic-release/semantic-release) from 24.2.3 to 24.2.4.
- [Release notes](https://github.com/semantic-release/semantic-release/releases)
- [Commits](https://github.com/semantic-release/semantic-release/compare/v24.2.3...v24.2.4)

---
updated-dependencies:
- dependency-name: semantic-release
  dependency-version: 24.2.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>
2025-05-19 19:55:28 -06:00
dependabot[bot]
d04a040f85
chore(deps-dev): Bump rollup from 4.40.2 to 4.41.0 (#3692)
Bumps [rollup](https://github.com/rollup/rollup) from 4.40.2 to 4.41.0.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.40.2...v4.41.0)

---
updated-dependencies:
- dependency-name: rollup
  dependency-version: 4.41.0
  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>
2025-05-19 11:15:13 -06:00
dependabot[bot]
5672651e7c
chore(deps-dev): Bump eslint from 9.26.0 to 9.27.0 (#3691)
Bumps [eslint](https://github.com/eslint/eslint) from 9.26.0 to 9.27.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.26.0...v9.27.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 9.27.0
  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>
2025-05-19 11:14:52 -06:00
dependabot[bot]
89818b26e6
chore(deps-dev): Bump undici from 6.21.1 to 6.21.3 (#3684)
Bumps [undici](https://github.com/nodejs/undici) from 6.21.1 to 6.21.3.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v6.21.1...v6.21.3)

---
updated-dependencies:
- dependency-name: undici
  dependency-version: 6.21.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-15 09:43:04 -06:00
dependabot[bot]
2516064051
chore(deps-dev): Bump rollup from 4.40.1 to 4.40.2 (#3681)
Bumps [rollup](https://github.com/rollup/rollup) from 4.40.1 to 4.40.2.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.40.1...v4.40.2)

---
updated-dependencies:
- dependency-name: rollup
  dependency-version: 4.40.2
  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>
2025-05-12 10:40:59 -06:00
dependabot[bot]
ed78e7f000
chore(deps-dev): Bump @arethetypeswrong/cli from 0.17.4 to 0.18.1 (#3682)
Bumps [@arethetypeswrong/cli](https://github.com/arethetypeswrong/arethetypeswrong.github.io/tree/HEAD/packages/cli) from 0.17.4 to 0.18.1.
- [Release notes](https://github.com/arethetypeswrong/arethetypeswrong.github.io/releases)
- [Changelog](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/packages/cli/CHANGELOG.md)
- [Commits](https://github.com/arethetypeswrong/arethetypeswrong.github.io/commits/HEAD/packages/cli)

---
updated-dependencies:
- dependency-name: "@arethetypeswrong/cli"
  dependency-version: 0.18.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>
2025-05-12 10:40:41 -06:00
dependabot[bot]
9fcb8bbe64
chore(deps-dev): Bump eslint from 9.25.1 to 9.26.0 (#3680)
Bumps [eslint](https://github.com/eslint/eslint) from 9.25.1 to 9.26.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.25.1...v9.26.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 9.26.0
  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>
2025-05-05 10:33:41 -06:00
dependabot[bot]
f455d412f1
chore(deps-dev): Bump rollup from 4.40.0 to 4.40.1 (#3678)
Bumps [rollup](https://github.com/rollup/rollup) from 4.40.0 to 4.40.1.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.40.0...v4.40.1)

---
updated-dependencies:
- dependency-name: rollup
  dependency-version: 4.40.1
  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>
2025-04-28 11:19:26 -06:00
dependabot[bot]
440cebdb54
chore(deps-dev): Bump eslint from 9.25.0 to 9.25.1 (#3677)
Bumps [eslint](https://github.com/eslint/eslint) from 9.25.0 to 9.25.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.25.0...v9.25.1)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 9.25.1
  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>
2025-04-28 11:19:14 -06:00
dependabot[bot]
71d3e95f38
chore(deps-dev): Bump @semantic-release/github from 11.0.1 to 11.0.2 (#3676)
Bumps [@semantic-release/github](https://github.com/semantic-release/github) from 11.0.1 to 11.0.2.
- [Release notes](https://github.com/semantic-release/github/releases)
- [Commits](https://github.com/semantic-release/github/compare/v11.0.1...v11.0.2)

---
updated-dependencies:
- dependency-name: "@semantic-release/github"
  dependency-version: 11.0.2
  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>
2025-04-28 11:19:03 -06:00
semantic-release-bot
ea13bbe1e6 chore(release): 15.0.11 [skip ci]
## [15.0.11](https://github.com/markedjs/marked/compare/v15.0.10...v15.0.11) (2025-04-25)

### Bug Fixes

* fix image alt text rendered to match common mark ([#3668](https://github.com/markedjs/marked/issues/3668)) ([2c0e47a](2c0e47a4ce))
2025-04-25 00:46:58 +00:00
Tony Brix
2c0e47a4ce
fix: fix image alt text rendered to match common mark (#3668) 2025-04-24 18:41:02 -06:00
semantic-release-bot
d5bc76eb3c chore(release): 15.0.10 [skip ci]
## [15.0.10](https://github.com/markedjs/marked/compare/v15.0.9...v15.0.10) (2025-04-23)

### Bug Fixes

* fix non-breaking space in link url ([#3667](https://github.com/markedjs/marked/issues/3667)) ([e071e25](e071e25d13))
2025-04-23 20:59:33 +00:00
Tony Brix
e071e25d13
fix: fix non-breaking space in link url (#3667) 2025-04-23 14:53:45 -06:00
semantic-release-bot
c37336c241 chore(release): 15.0.9 [skip ci]
## [15.0.9](https://github.com/markedjs/marked/compare/v15.0.8...v15.0.9) (2025-04-21)

### Bug Fixes

* fix link url with no closing parenthesis ([#3664](https://github.com/markedjs/marked/issues/3664)) ([72b6373](72b63739f4))
2025-04-21 23:09:24 +00:00
Tony Brix
72b63739f4
fix: fix link url with no closing parenthesis (#3664)
* fix: fix link url with no closing parenthesis

* add escape test

* add double escape
2025-04-21 17:03:37 -06:00
dependabot[bot]
d5e5f8fbbc
chore(deps-dev): Bump eslint from 9.24.0 to 9.25.0 (#3665)
Bumps [eslint](https://github.com/eslint/eslint) from 9.24.0 to 9.25.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.24.0...v9.25.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 9.25.0
  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>
2025-04-21 15:34:09 -06:00
dependabot[bot]
16b34a064b
chore(deps-dev): Bump rollup from 4.39.0 to 4.40.0 (#3660)
Bumps [rollup](https://github.com/rollup/rollup) from 4.39.0 to 4.40.0.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.39.0...v4.40.0)

---
updated-dependencies:
- dependency-name: rollup
  dependency-version: 4.40.0
  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>
2025-04-14 11:18:57 -06:00
dependabot[bot]
7e188fea12
chore(deps-dev): Bump rollup from 4.38.0 to 4.39.0 (#3656)
Bumps [rollup](https://github.com/rollup/rollup) from 4.38.0 to 4.39.0.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.38.0...v4.39.0)

---
updated-dependencies:
- dependency-name: rollup
  dependency-version: 4.39.0
  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>
2025-04-07 10:25:11 -06:00
dependabot[bot]
1dc18c6fe9
chore(deps-dev): Bump eslint from 9.23.0 to 9.24.0 (#3655)
Bumps [eslint](https://github.com/eslint/eslint) from 9.23.0 to 9.24.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.23.0...v9.24.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-version: 9.24.0
  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>
2025-04-07 10:22:05 -06:00
dependabot[bot]
3fc5c1d3e6
chore(deps-dev): Bump typescript from 5.8.2 to 5.8.3 (#3654)
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.8.2 to 5.8.3.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release-publish.yml)
- [Commits](https://github.com/microsoft/TypeScript/commits)

---
updated-dependencies:
- dependency-name: typescript
  dependency-version: 5.8.3
  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>
2025-04-07 10:19:31 -06:00
semantic-release-bot
fc85f92607 chore(release): 15.0.8 [skip ci]
## [15.0.8](https://github.com/markedjs/marked/compare/v15.0.7...v15.0.8) (2025-04-07)

### Bug Fixes

* fix emstrong inside escaped backticks ([#3652](https://github.com/markedjs/marked/issues/3652)) ([721dc58](721dc58ceb))
2025-04-07 15:08:04 +00:00
Tony Brix
721dc58ceb
fix: fix emstrong inside escaped backticks (#3652)
* fix: fix emstrong inside escaped backticks

* add tests

* lint
2025-04-07 09:02:11 -06:00
dependabot[bot]
1ac6bc1f83
chore(deps-dev): Bump rollup from 4.37.0 to 4.38.0 (#3650)
Bumps [rollup](https://github.com/rollup/rollup) from 4.37.0 to 4.38.0.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.37.0...v4.38.0)

---
updated-dependencies:
- dependency-name: rollup
  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>
2025-03-31 09:41:35 -06:00
Vladimir
d120e014d3
chore(docs): Add marked-typograf extension to the docs (#3649)
add a new extension to the list
2025-03-31 00:31:10 -06:00
dependabot[bot]
b5bcd7c8ba
chore(deps-dev): Bump rollup from 4.36.0 to 4.37.0 (#3647)
Bumps [rollup](https://github.com/rollup/rollup) from 4.36.0 to 4.37.0.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.36.0...v4.37.0)

---
updated-dependencies:
- dependency-name: rollup
  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>
2025-03-24 12:07:34 -06:00
dependabot[bot]
11b82b9015
chore(deps-dev): Bump eslint from 9.22.0 to 9.23.0 (#3646)
Bumps [eslint](https://github.com/eslint/eslint) from 9.22.0 to 9.23.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.22.0...v9.23.0)

---
updated-dependencies:
- dependency-name: eslint
  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>
2025-03-24 12:07:13 -06:00
dependabot[bot]
0efaf92110
chore(deps-dev): Bump rollup from 4.35.0 to 4.36.0 (#3642)
Bumps [rollup](https://github.com/rollup/rollup) from 4.35.0 to 4.36.0.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.35.0...v4.36.0)

---
updated-dependencies:
- dependency-name: rollup
  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>
2025-03-17 10:50:34 -06:00
dependabot[bot]
7fee000577
chore(deps-dev): Bump @markedjs/eslint-config from 1.0.11 to 1.0.12 (#3639)
Bumps @markedjs/eslint-config from 1.0.11 to 1.0.12.

---
updated-dependencies:
- dependency-name: "@markedjs/eslint-config"
  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>
2025-03-10 09:58:57 -06:00
dependabot[bot]
a530fb41c6
chore(deps-dev): Bump rollup from 4.34.9 to 4.35.0 (#3638)
Bumps [rollup](https://github.com/rollup/rollup) from 4.34.9 to 4.35.0.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.34.9...v4.35.0)

---
updated-dependencies:
- dependency-name: rollup
  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>
2025-03-10 09:58:46 -06:00
dependabot[bot]
7c30e003e3
chore(deps-dev): Bump eslint from 9.21.0 to 9.22.0 (#3637)
Bumps [eslint](https://github.com/eslint/eslint) from 9.21.0 to 9.22.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.21.0...v9.22.0)

---
updated-dependencies:
- dependency-name: eslint
  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>
2025-03-10 09:58:33 -06:00
dependabot[bot]
c057321c2e
chore(deps-dev): Bump recheck from 4.4.5 to 4.5.0 (#3635)
Bumps [recheck](https://github.com/makenowjust-labs/recheck) from 4.4.5 to 4.5.0.
- [Release notes](https://github.com/makenowjust-labs/recheck/releases)
- [Changelog](https://github.com/makenowjust-labs/recheck/blob/main/CHANGELOG.md)
- [Commits](https://github.com/makenowjust-labs/recheck/compare/v4.4.5...v4.5.0)

---
updated-dependencies:
- dependency-name: recheck
  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>
2025-03-03 10:19:57 -07:00
dependabot[bot]
7b0a4cc1c7
chore(deps-dev): Bump @markedjs/eslint-config from 1.0.10 to 1.0.11 (#3634)
Bumps @markedjs/eslint-config from 1.0.10 to 1.0.11.

---
updated-dependencies:
- dependency-name: "@markedjs/eslint-config"
  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>
2025-03-03 10:19:45 -07:00
dependabot[bot]
20b49ff6dd
chore(deps-dev): Bump typescript from 5.7.3 to 5.8.2 (#3633)
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.7.3 to 5.8.2.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.7.3...v5.8.2)

---
updated-dependencies:
- dependency-name: typescript
  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>
2025-03-03 10:17:21 -07:00
dependabot[bot]
603a64a977
chore(deps-dev): Bump rollup from 4.34.8 to 4.34.9 (#3632)
Bumps [rollup](https://github.com/rollup/rollup) from 4.34.8 to 4.34.9.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.34.8...v4.34.9)

---
updated-dependencies:
- dependency-name: rollup
  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>
2025-03-03 10:17:10 -07:00
chirsz
f92bdceb2c
chore(docs): add marked-cjk-breaks to "Known Extensions" (#3629) 2025-02-28 12:18:41 -07:00
dependabot[bot]
b9df3fe1d7
chore(deps-dev): Bump @arethetypeswrong/cli from 0.17.3 to 0.17.4 (#3625)
Bumps [@arethetypeswrong/cli](https://github.com/arethetypeswrong/arethetypeswrong.github.io/tree/HEAD/packages/cli) from 0.17.3 to 0.17.4.
- [Release notes](https://github.com/arethetypeswrong/arethetypeswrong.github.io/releases)
- [Changelog](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/packages/cli/CHANGELOG.md)
- [Commits](https://github.com/arethetypeswrong/arethetypeswrong.github.io/commits/HEAD/packages/cli)

---
updated-dependencies:
- dependency-name: "@arethetypeswrong/cli"
  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>
2025-02-24 09:54:56 -07:00
dependabot[bot]
0177389ca1
chore(deps-dev): Bump eslint from 9.20.1 to 9.21.0 (#3626)
Bumps [eslint](https://github.com/eslint/eslint) from 9.20.1 to 9.21.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.20.1...v9.21.0)

---
updated-dependencies:
- dependency-name: eslint
  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>
2025-02-24 09:54:06 -07:00
dependabot[bot]
aa7a8a2b89
chore(deps-dev): Bump rollup from 4.34.6 to 4.34.8 (#3619)
Bumps [rollup](https://github.com/rollup/rollup) from 4.34.6 to 4.34.8.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.34.6...v4.34.8)

---
updated-dependencies:
- dependency-name: rollup
  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>
2025-02-17 09:27:43 -07:00
dependabot[bot]
9c9fb82ed6
chore(deps-dev): Bump eslint from 9.20.0 to 9.20.1 (#3620)
Bumps [eslint](https://github.com/eslint/eslint) from 9.20.0 to 9.20.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.20.0...v9.20.1)

---
updated-dependencies:
- dependency-name: eslint
  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>
2025-02-17 09:25:41 -07:00
dependabot[bot]
74a36bf74c
chore(deps-dev): Bump semantic-release from 24.2.2 to 24.2.3 (#3618)
Bumps [semantic-release](https://github.com/semantic-release/semantic-release) from 24.2.2 to 24.2.3.
- [Release notes](https://github.com/semantic-release/semantic-release/releases)
- [Commits](https://github.com/semantic-release/semantic-release/compare/v24.2.2...v24.2.3)

---
updated-dependencies:
- dependency-name: semantic-release
  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>
2025-02-17 09:25:21 -07:00
dependabot[bot]
9cbb7a6c33
chore(deps-dev): Bump semantic-release from 24.2.1 to 24.2.2 (#3615)
Bumps [semantic-release](https://github.com/semantic-release/semantic-release) from 24.2.1 to 24.2.2.
- [Release notes](https://github.com/semantic-release/semantic-release/releases)
- [Commits](https://github.com/semantic-release/semantic-release/compare/v24.2.1...v24.2.2)

---
updated-dependencies:
- dependency-name: semantic-release
  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>
2025-02-10 11:06:26 -07:00
dependabot[bot]
13a385ecc6
chore(deps-dev): Bump eslint from 9.19.0 to 9.20.0 (#3616)
Bumps [eslint](https://github.com/eslint/eslint) from 9.19.0 to 9.20.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.19.0...v9.20.0)

---
updated-dependencies:
- dependency-name: eslint
  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>
2025-02-10 10:58:03 -07:00
dependabot[bot]
f967af5b3b
chore(deps-dev): Bump rollup from 4.34.1 to 4.34.6 (#3614)
Bumps [rollup](https://github.com/rollup/rollup) from 4.34.1 to 4.34.6.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.34.1...v4.34.6)

---
updated-dependencies:
- dependency-name: rollup
  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>
2025-02-10 10:57:43 -07:00
Tony Brix
bf4952f495
chore: fix pkg repository (#3613) 2025-02-09 16:38:46 -07:00
semantic-release-bot
2b996929b2 chore(release): 15.0.7 [skip ci]
## [15.0.7](https://github.com/markedjs/marked/compare/v15.0.6...v15.0.7) (2025-02-09)

### Bug Fixes

* fix table rendered as heading ([#3612](https://github.com/markedjs/marked/issues/3612)) ([9ae87de](9ae87de7cb))
2025-02-09 23:18:11 +00:00
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
Frank Lemanschik
a1113e02ca
chore: Update dingus.js import json (#3611)
* Update dingus.js import json

found a better way to import json that works also with other engines like chrome and graalvm .....

* Update dingus.js

Fix: double quote replaced by single quote
2025-02-08 23:36:15 -07:00
dependabot[bot]
eb61090b41
chore(deps-dev): Bump rollup from 4.32.0 to 4.34.1 (#3606)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-03 21:11:15 -07:00
dependabot[bot]
00576d2daa
chore(deps-dev): Bump @markedjs/eslint-config from 1.0.9 to 1.0.10 (#3605)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-03 21:11:05 -07:00
dependabot[bot]
570450c419
chore(deps-dev): Bump eslint from 9.18.0 to 9.19.0 (#3600)
Bumps [eslint](https://github.com/eslint/eslint) from 9.18.0 to 9.19.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.18.0...v9.19.0)

---
updated-dependencies:
- dependency-name: eslint
  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>
2025-01-27 09:12:04 -07:00
dependabot[bot]
5fccfb29ef
chore(deps-dev): Bump rollup from 4.31.0 to 4.32.0 (#3601)
Bumps [rollup](https://github.com/rollup/rollup) from 4.31.0 to 4.32.0.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.31.0...v4.32.0)

---
updated-dependencies:
- dependency-name: rollup
  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>
2025-01-27 09:11:52 -07:00
dependabot[bot]
b114f210e2
chore(deps-dev): Bump undici from 6.19.7 to 6.21.1 (#3596)
Bumps [undici](https://github.com/nodejs/undici) from 6.19.7 to 6.21.1.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v6.19.7...v6.21.1)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-21 17:57:07 -07:00
dependabot[bot]
29cf001226
chore(deps-dev): Bump rollup from 4.30.1 to 4.31.0 (#3595)
Bumps [rollup](https://github.com/rollup/rollup) from 4.30.1 to 4.31.0.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.30.1...v4.31.0)

---
updated-dependencies:
- dependency-name: rollup
  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>
2025-01-20 10:24:27 -07:00
dependabot[bot]
9f2926c53f
chore(deps-dev): Bump eslint from 9.17.0 to 9.18.0 (#3588)
Bumps [eslint](https://github.com/eslint/eslint) from 9.17.0 to 9.18.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.17.0...v9.18.0)

---
updated-dependencies:
- dependency-name: eslint
  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>
2025-01-13 08:32:00 -07:00
dependabot[bot]
dba110830b
chore(deps-dev): Bump rollup from 4.30.0 to 4.30.1 (#3587)
Bumps [rollup](https://github.com/rollup/rollup) from 4.30.0 to 4.30.1.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.30.0...v4.30.1)

---
updated-dependencies:
- dependency-name: rollup
  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>
2025-01-13 08:31:47 -07:00
dependabot[bot]
218d77a40a
chore(deps-dev): Bump typescript from 5.7.2 to 5.7.3 (#3586)
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.7.2 to 5.7.3.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.7.2...v5.7.3)

---
updated-dependencies:
- dependency-name: typescript
  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>
2025-01-13 08:31:32 -07:00
dependabot[bot]
c71d355737
chore(deps-dev): Bump @arethetypeswrong/cli from 0.17.2 to 0.17.3 (#3585)
Bumps [@arethetypeswrong/cli](https://github.com/arethetypeswrong/arethetypeswrong.github.io/tree/HEAD/packages/cli) from 0.17.2 to 0.17.3.
- [Release notes](https://github.com/arethetypeswrong/arethetypeswrong.github.io/releases)
- [Changelog](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/packages/cli/CHANGELOG.md)
- [Commits](https://github.com/arethetypeswrong/arethetypeswrong.github.io/commits/HEAD/packages/cli)

---
updated-dependencies:
- dependency-name: "@arethetypeswrong/cli"
  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>
2025-01-13 08:31:20 -07:00
semantic-release-bot
5624378bd3 chore(release): 15.0.6 [skip ci]
## [15.0.6](https://github.com/markedjs/marked/compare/v15.0.5...v15.0.6) (2025-01-06)

### Bug Fixes

* fix strikethrough inside strong and em to follow gfm ([#3577](https://github.com/markedjs/marked/issues/3577)) ([7712a53](7712a5324f))
2025-01-06 16:02:29 +00:00
dependabot[bot]
e6a5413393
chore(deps-dev): Bump rollup from 4.29.1 to 4.30.0 (#3581)
Bumps [rollup](https://github.com/rollup/rollup) from 4.29.1 to 4.30.0.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.29.1...v4.30.0)

---
updated-dependencies:
- dependency-name: rollup
  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>
2025-01-06 08:56:37 -07:00
dependabot[bot]
1ae07972db
chore(deps-dev): Bump @semantic-release/release-notes-generator from 14.0.2 to 14.0.3 (#3580)
chore(deps-dev): Bump @semantic-release/release-notes-generator

Bumps [@semantic-release/release-notes-generator](https://github.com/semantic-release/release-notes-generator) from 14.0.2 to 14.0.3.
- [Release notes](https://github.com/semantic-release/release-notes-generator/releases)
- [Commits](https://github.com/semantic-release/release-notes-generator/compare/v14.0.2...v14.0.3)

---
updated-dependencies:
- dependency-name: "@semantic-release/release-notes-generator"
  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>
2025-01-06 08:55:02 -07:00
dependabot[bot]
6ae1e9d46d
chore(deps-dev): Bump semantic-release from 24.2.0 to 24.2.1 (#3579)
Bumps [semantic-release](https://github.com/semantic-release/semantic-release) from 24.2.0 to 24.2.1.
- [Release notes](https://github.com/semantic-release/semantic-release/releases)
- [Commits](https://github.com/semantic-release/semantic-release/compare/v24.2.0...v24.2.1)

---
updated-dependencies:
- dependency-name: semantic-release
  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>
2025-01-06 08:54:43 -07:00
dependabot[bot]
7430f4307d
chore(deps-dev): Bump @semantic-release/commit-analyzer from 13.0.0 to 13.0.1 (#3578)
chore(deps-dev): Bump @semantic-release/commit-analyzer

Bumps [@semantic-release/commit-analyzer](https://github.com/semantic-release/commit-analyzer) from 13.0.0 to 13.0.1.
- [Release notes](https://github.com/semantic-release/commit-analyzer/releases)
- [Commits](https://github.com/semantic-release/commit-analyzer/compare/v13.0.0...v13.0.1)

---
updated-dependencies:
- dependency-name: "@semantic-release/commit-analyzer"
  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>
2025-01-06 08:54:30 -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
semantic-release-bot
42ac48b9b4 chore(release): 15.0.5 [skip ci]
## [15.0.5](https://github.com/markedjs/marked/compare/v15.0.4...v15.0.5) (2025-01-02)

### Bug Fixes

* allow strikethrough inside strong and em to follow gfm ([#3569](https://github.com/markedjs/marked/issues/3569)) ([8a01658](8a01658cac))
2025-01-02 15:40:56 +00:00
Tony Brix
8a01658cac
fix: allow strikethrough inside strong and em to follow gfm (#3569) 2025-01-02 08:34:55 -07:00
dependabot[bot]
33eb5c6a3a
chore(deps-dev): Bump highlight.js from 11.11.0 to 11.11.1 (#3572)
Bumps [highlight.js](https://github.com/highlightjs/highlight.js) from 11.11.0 to 11.11.1.
- [Release notes](https://github.com/highlightjs/highlight.js/releases)
- [Changelog](https://github.com/highlightjs/highlight.js/blob/main/CHANGES.md)
- [Commits](https://github.com/highlightjs/highlight.js/compare/11.11.0...11.11.1)

---
updated-dependencies:
- dependency-name: highlight.js
  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>
2024-12-30 09:54:21 -07:00
dependabot[bot]
476b85e99a
chore(deps-dev): Bump @arethetypeswrong/cli from 0.17.1 to 0.17.2 (#3568)
Bumps [@arethetypeswrong/cli](https://github.com/arethetypeswrong/arethetypeswrong.github.io/tree/HEAD/packages/cli) from 0.17.1 to 0.17.2.
- [Release notes](https://github.com/arethetypeswrong/arethetypeswrong.github.io/releases)
- [Changelog](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/packages/cli/CHANGELOG.md)
- [Commits](https://github.com/arethetypeswrong/arethetypeswrong.github.io/commits/HEAD/packages/cli)

---
updated-dependencies:
- dependency-name: "@arethetypeswrong/cli"
  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>
2024-12-23 09:08:04 -07:00
dependabot[bot]
efa72f913e
chore(deps-dev): Bump @semantic-release/release-notes-generator from 14.0.1 to 14.0.2 (#3567)
chore(deps-dev): Bump @semantic-release/release-notes-generator

Bumps [@semantic-release/release-notes-generator](https://github.com/semantic-release/release-notes-generator) from 14.0.1 to 14.0.2.
- [Release notes](https://github.com/semantic-release/release-notes-generator/releases)
- [Commits](https://github.com/semantic-release/release-notes-generator/compare/v14.0.1...v14.0.2)

---
updated-dependencies:
- dependency-name: "@semantic-release/release-notes-generator"
  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>
2024-12-23 09:00:47 -07:00
dependabot[bot]
eeb7bb46f8
chore(deps-dev): Bump rollup from 4.28.1 to 4.29.1 (#3566)
Bumps [rollup](https://github.com/rollup/rollup) from 4.28.1 to 4.29.1.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rollup/rollup/compare/v4.28.1...v4.29.1)

---
updated-dependencies:
- dependency-name: rollup
  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>
2024-12-23 09:00:32 -07:00
dependabot[bot]
32008109fe
chore(deps-dev): Bump highlight.js from 11.10.0 to 11.11.0 (#3563)
Bumps [highlight.js](https://github.com/highlightjs/highlight.js) from 11.10.0 to 11.11.0.
- [Release notes](https://github.com/highlightjs/highlight.js/releases)
- [Changelog](https://github.com/highlightjs/highlight.js/blob/main/CHANGES.md)
- [Commits](https://github.com/highlightjs/highlight.js/compare/11.10.0...11.11.0)

---
updated-dependencies:
- dependency-name: highlight.js
  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>
2024-12-16 08:51:05 -07:00
dependabot[bot]
b43380068a
chore(deps-dev): Bump @rollup/plugin-typescript from 12.1.1 to 12.1.2 (#3564)
Bumps [@rollup/plugin-typescript](https://github.com/rollup/plugins/tree/HEAD/packages/typescript) from 12.1.1 to 12.1.2.
- [Changelog](https://github.com/rollup/plugins/blob/master/packages/typescript/CHANGELOG.md)
- [Commits](https://github.com/rollup/plugins/commits/typescript-v12.1.2/packages/typescript)

---
updated-dependencies:
- dependency-name: "@rollup/plugin-typescript"
  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>
2024-12-16 08:46:50 -07:00
dependabot[bot]
97343e1aa8
chore(deps-dev): Bump eslint from 9.16.0 to 9.17.0 (#3562)
Bumps [eslint](https://github.com/eslint/eslint) from 9.16.0 to 9.17.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v9.16.0...v9.17.0)

---
updated-dependencies:
- dependency-name: eslint
  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>
2024-12-16 08:46:20 -07:00
30 changed files with 1651 additions and 534 deletions

View File

@ -31,6 +31,8 @@ jobs:
run: npm run test:unit run: npm run test:unit
- name: Run Spec Tests 👩🏽‍💻 - name: Run Spec Tests 👩🏽‍💻
run: npm run test:specs run: npm run test:specs
- name: Run CJS Tests 👩🏽‍💻
run: npm run test:cjs
OtherTests: OtherTests:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -1,7 +1,7 @@
import { marked } from '../lib/marked.esm.js'; import { marked } from '../lib/marked.esm.js';
import { createRequire } from 'node:module'; import pkg from '../package.json' with { type: 'json' };
const require = createRequire(import.meta.url);
const version = require('../package.json').version; const version = pkg.version;
const name = 'Marked'; const name = 'Marked';
export default function dingus(req, res) { export default function dingus(req, res) {

View File

@ -85,6 +85,7 @@ Marked can be extended using [custom extensions](/using_pro#extensions). This is
|[Alert](https://github.com/bent10/marked-extensions/tree/main/packages/alert)|[`marked-alert`](https://www.npmjs.com/package/marked-alert)|Enables [GFM alerts](https://github.com/orgs/community/discussions/16925)| |[Alert](https://github.com/bent10/marked-extensions/tree/main/packages/alert)|[`marked-alert`](https://www.npmjs.com/package/marked-alert)|Enables [GFM alerts](https://github.com/orgs/community/discussions/16925)|
|[Base URL](https://github.com/markedjs/marked-base-url)|[`marked-base-url`](https://www.npmjs.com/package/marked-base-url)|Prefix relative urls with a base URL.| |[Base URL](https://github.com/markedjs/marked-base-url)|[`marked-base-url`](https://www.npmjs.com/package/marked-base-url)|Prefix relative urls with a base URL.|
|[Bidi](https://github.com/markedjs/marked-bidi)|[`marked-bidi`](https://www.npmjs.com/package/marked-bidi)|Add Bidirectional text support to the HTML| |[Bidi](https://github.com/markedjs/marked-bidi)|[`marked-bidi`](https://www.npmjs.com/package/marked-bidi)|Add Bidirectional text support to the HTML|
|[CJK Breaks](https://github.com/chirsz-ever/marked-cjk-breaks)|[`marked-cjk-breaks`](https://www.npmjs.com/package/marked-cjk-breaks)|Suppress soft linebreaks between east asian characters.|
|[Code Format](https://github.com/bent10/marked-extensions/tree/main/packages/code-format)|[`marked-code-format`](https://www.npmjs.com/package/marked-code-format)|Formatting code blocks using Prettier| |[Code Format](https://github.com/bent10/marked-extensions/tree/main/packages/code-format)|[`marked-code-format`](https://www.npmjs.com/package/marked-code-format)|Formatting code blocks using Prettier|
|[Code JSX Renderer](https://github.com/bent10/marked-extensions/tree/main/packages/code-jsx-renderer)|[`marked-code-jsx-renderer`](https://www.npmjs.com/package/marked-code-jsx-renderer)|Render JSX code blocks using a custom renderer and components| |[Code JSX Renderer](https://github.com/bent10/marked-extensions/tree/main/packages/code-jsx-renderer)|[`marked-code-jsx-renderer`](https://www.npmjs.com/package/marked-code-jsx-renderer)|Render JSX code blocks using a custom renderer and components|
|[Code Preview](https://github.com/bent10/marked-extensions/tree/main/packages/code-preview)|[`marked-code-preview`](https://www.npmjs.com/package/marked-code-preview)|Transform code blocks into code previews| |[Code Preview](https://github.com/bent10/marked-extensions/tree/main/packages/code-preview)|[`marked-code-preview`](https://www.npmjs.com/package/marked-code-preview)|Transform code blocks into code previews|
@ -105,6 +106,7 @@ Marked can be extended using [custom extensions](/using_pro#extensions). This is
|[Sequential Hooks](https://github.com/bent10/marked-extensions/tree/main/packages/sequential-hooks)|[`marked-sequential-hooks`](https://www.npmjs.com/package/marked-sequential-hooks)|Enables the sequential preprocessing and post-processing within [sequential hooks](https://github.com/bent10/marked-extensions#sequential-hooks)| |[Sequential Hooks](https://github.com/bent10/marked-extensions/tree/main/packages/sequential-hooks)|[`marked-sequential-hooks`](https://www.npmjs.com/package/marked-sequential-hooks)|Enables the sequential preprocessing and post-processing within [sequential hooks](https://github.com/bent10/marked-extensions#sequential-hooks)|
|[Smartypants](https://github.com/markedjs/marked-smartypants)|[`marked-smartypants`](https://www.npmjs.com/package/marked-smartypants)|Use [smartypants](https://www.npmjs.com/package/smartypants) to use "smart" typographic punctuation for things like quotes and dashes.| |[Smartypants](https://github.com/markedjs/marked-smartypants)|[`marked-smartypants`](https://www.npmjs.com/package/marked-smartypants)|Use [smartypants](https://www.npmjs.com/package/smartypants) to use "smart" typographic punctuation for things like quotes and dashes.|
|[Smartypants lite](https://github.com/calculuschild/marked-smartypants-lite)|[`marked-smartypants-lite`](https://www.npmjs.com/package/marked-smartypants-lite)|A faster lighter version of marked-smartypants that doesn't use any external dependencies to create "smart" typographic punctuation for things like quotes and dashes.| |[Smartypants lite](https://github.com/calculuschild/marked-smartypants-lite)|[`marked-smartypants-lite`](https://www.npmjs.com/package/marked-smartypants-lite)|A faster lighter version of marked-smartypants that doesn't use any external dependencies to create "smart" typographic punctuation for things like quotes and dashes.|
|[Typograf](https://github.com/laidrivm/marked-typograf)|[`marked-typograf`](https://www.npmjs.com/package/marked-typograf)|Use [typograf](https://www.npmjs.com/package/typograf) as a more powerful and extendable alternative to Smartypants for creating “smart” typographic punctuation, such as quotes and dashes.|
|[XHTML](https://github.com/markedjs/marked-xhtml)|[`marked-xhtml`](https://www.npmjs.com/package/marked-xhtml)|Emit self-closing HTML tags for void elements (&lt;br/&gt;, &lt;img/&gt;, etc.) with a "/" as required by XHTML.| |[XHTML](https://github.com/markedjs/marked-xhtml)|[`marked-xhtml`](https://www.npmjs.com/package/marked-xhtml)|Emit self-closing HTML tags for void elements (&lt;br/&gt;, &lt;img/&gt;, etc.) with a "/" as required by XHTML.|
<h2 id="inline">Inline Markdown</h2> <h2 id="inline">Inline Markdown</h2>

61
esbuild.config.js Normal file
View File

@ -0,0 +1,61 @@
import * as esbuild from 'esbuild';
import { umdWrapper } from 'esbuild-plugin-umd-wrapper';
import fs from 'fs';
const version = process.env.SEMANTIC_RELEASE_NEXT_VERSION || JSON.parse(fs.readFileSync('./package.json')).version;
console.log('building version:', version);
const banner = `/**
* marked v${version} - a markdown parser
* Copyright (c) 2011-${new Date().getFullYear()}, Christopher Jeffrey. (MIT Licensed)
* https://github.com/markedjs/marked
*/
/**
* DO NOT EDIT THIS FILE
* The code in this file is generated from files in ./src/
*/
`;
function config(options) {
return {
entryPoints: ['src/marked.ts'],
banner: {
js: banner,
},
sourcemap: true,
bundle: true,
minify: false,
...(options.format === 'umd'
? {
plugins: [umdWrapper({
libraryName: 'marked',
})],
}
: {}),
...options,
};
}
await esbuild.build(config({
format: 'esm',
outfile: 'lib/marked.esm.js',
}));
await esbuild.build(config({
format: 'cjs',
outfile: 'lib/marked.cjs',
}));
await esbuild.build(config({
format: 'umd',
outfile: 'lib/marked.umd.js',
}));
await esbuild.build(config({
sourcemap: false,
minify: true,
format: 'umd',
outfile: 'marked.min.js',
}));

1596
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
"name": "marked", "name": "marked",
"description": "A markdown parser built for speed", "description": "A markdown parser built for speed",
"author": "Christopher Jeffrey", "author": "Christopher Jeffrey",
"version": "15.0.4", "version": "15.0.12",
"type": "module", "type": "module",
"main": "./lib/marked.cjs", "main": "./lib/marked.cjs",
"module": "./lib/marked.esm.js", "module": "./lib/marked.esm.js",
@ -36,7 +36,10 @@
"publishConfig": { "publishConfig": {
"provenance": true "provenance": true
}, },
"repository": "git://github.com/markedjs/marked.git", "repository": {
"type": "git",
"url": "git://github.com/markedjs/marked.git"
},
"homepage": "https://marked.js.org", "homepage": "https://marked.js.org",
"bugs": { "bugs": {
"url": "http://github.com/markedjs/marked/issues" "url": "http://github.com/markedjs/marked/issues"
@ -53,44 +56,44 @@
"html" "html"
], ],
"devDependencies": { "devDependencies": {
"@arethetypeswrong/cli": "^0.17.1", "@arethetypeswrong/cli": "^0.18.1",
"@markedjs/eslint-config": "^1.0.9", "@markedjs/eslint-config": "^1.0.12",
"@markedjs/testutils": "14.1.1-0", "@markedjs/testutils": "14.1.1-0",
"@rollup/plugin-terser": "^0.4.4", "@semantic-release/commit-analyzer": "^13.0.1",
"@rollup/plugin-typescript": "^12.1.1",
"@semantic-release/commit-analyzer": "^13.0.0",
"@semantic-release/git": "^10.0.1", "@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^11.0.1", "@semantic-release/github": "^11.0.2",
"@semantic-release/npm": "^12.0.1", "@semantic-release/npm": "^12.0.1",
"@semantic-release/release-notes-generator": "^14.0.1", "@semantic-release/release-notes-generator": "^14.0.3",
"cheerio": "1.0.0", "cheerio": "1.0.0",
"commonmark": "0.31.2", "commonmark": "0.31.2",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"dts-bundle-generator": "^9.5.1", "dts-bundle-generator": "^9.5.1",
"eslint": "^9.16.0", "esbuild": "^0.25.3",
"highlight.js": "^11.10.0", "esbuild-plugin-umd-wrapper": "^3.0.0",
"eslint": "^9.27.0",
"highlight.js": "^11.11.1",
"markdown-it": "14.1.0", "markdown-it": "14.1.0",
"marked-highlight": "^2.2.1", "marked-highlight": "^2.2.1",
"marked-man": "^2.1.0", "marked-man": "^2.1.0",
"recheck": "^4.4.5", "recheck": "^4.5.0",
"rollup": "^4.28.1", "semantic-release": "^24.2.4",
"semantic-release": "^24.2.0",
"titleize": "^4.0.0", "titleize": "^4.0.0",
"tslib": "^2.8.1", "tslib": "^2.8.1",
"typescript": "5.7.2" "typescript": "5.8.3"
}, },
"scripts": { "scripts": {
"bench": "npm run build && node test/bench.js", "bench": "npm run build && node test/bench.js",
"build": "npm run rollup && npm run build:types && npm run build:man", "build": "npm run build:esbuild && npm run build:types && npm run build:man",
"build:docs": "npm run build && node docs/build.js", "build:docs": "npm run build && node docs/build.js",
"build:esbuild": "node esbuild.config.js",
"build:man": "marked-man man/marked.1.md > man/marked.1", "build:man": "marked-man man/marked.1.md > man/marked.1",
"build:reset": "git checkout upstream/master lib/marked.cjs lib/marked.umd.js lib/marked.esm.js marked.min.js", "build:reset": "git checkout upstream/master lib/marked.cjs lib/marked.umd.js lib/marked.esm.js marked.min.js",
"build:types": "tsc && dts-bundle-generator --export-referenced-types --project tsconfig.json -o lib/marked.d.ts src/marked.ts && dts-bundle-generator --export-referenced-types --project tsconfig.json -o lib/marked.d.cts src/marked.ts", "build:types": "tsc && dts-bundle-generator --export-referenced-types --project tsconfig.json -o lib/marked.d.ts src/marked.ts && dts-bundle-generator --export-referenced-types --project tsconfig.json -o lib/marked.d.cts src/marked.ts",
"lint": "eslint --fix", "lint": "eslint --fix",
"rollup": "rollup -c rollup.config.js",
"rules": "node test/rules.js", "rules": "node test/rules.js",
"test": "npm run build && npm run test:specs && npm run test:unit", "test": "npm run build && npm run test:specs && npm run test:unit",
"test:all": "npm test && npm run test:umd && npm run test:types && npm run test:lint", "test:all": "npm test && npm run test:umd && npm run test:cjs && npm run test:types && npm run test:lint",
"test:cjs": "node test/cjs-test.cjs",
"test:lint": "eslint", "test:lint": "eslint",
"test:only": "npm run build && npm run test:specs:only && npm run test:unit:only", "test:only": "npm run build && npm run test:specs:only && npm run test:unit:only",
"test:redos": "node test/recheck.js > vuln.js", "test:redos": "node test/recheck.js > vuln.js",

View File

@ -1,65 +0,0 @@
import typescript from '@rollup/plugin-typescript';
import terser from '@rollup/plugin-terser';
import { defineConfig } from 'rollup';
import fs from 'fs';
const version = process.env.SEMANTIC_RELEASE_NEXT_VERSION || JSON.parse(fs.readFileSync('./package.json')).version;
console.log('building version:', version);
const banner = `/**
* marked v${version} - a markdown parser
* Copyright (c) 2011-${new Date().getFullYear()}, Christopher Jeffrey. (MIT Licensed)
* https://github.com/markedjs/marked
*/
/**
* DO NOT EDIT THIS FILE
* The code in this file is generated from files in ./src/
*/
`;
export default defineConfig([
{
input: 'src/marked.ts',
output: [{
file: 'lib/marked.esm.js',
format: 'esm',
sourcemap: true,
banner,
},
{
file: 'lib/marked.umd.js',
format: 'umd',
name: 'marked',
sourcemap: true,
banner,
},
{
file: 'marked.min.js',
format: 'umd',
name: 'marked',
sourcemap: false,
banner,
plugins: [terser({
format: {
comments: (node, comment) => {
if (comment.type === 'comment2') {
return comment.value.includes('Copyright (c)');
}
},
},
})],
},
{
file: 'lib/marked.cjs',
format: 'cjs',
name: 'marked',
sourcemap: true,
banner,
}],
plugins: [
typescript(),
],
},
]);

View File

@ -312,16 +312,17 @@ export class _Lexer {
} }
} }
} }
// Mask out other blocks
while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) {
maskedSrc = maskedSrc.slice(0, match.index) + '[' + 'a'.repeat(match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
}
// Mask out escaped characters // Mask out escaped characters
while ((match = this.tokenizer.rules.inline.anyPunctuation.exec(maskedSrc)) != null) { while ((match = this.tokenizer.rules.inline.anyPunctuation.exec(maskedSrc)) != null) {
maskedSrc = maskedSrc.slice(0, match.index) + '++' + maskedSrc.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex); maskedSrc = maskedSrc.slice(0, match.index) + '++' + maskedSrc.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
} }
// Mask out other blocks
while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) {
maskedSrc = maskedSrc.slice(0, match.index) + '[' + 'a'.repeat(match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
}
let keepPrevChar = false; let keepPrevChar = false;
let prevChar = ''; let prevChar = '';
while (src) { while (src) {

View File

@ -193,7 +193,10 @@ export class _Renderer {
return out; return out;
} }
image({ href, title, text }: Tokens.Image): string { image({ href, title, text, tokens }: Tokens.Image): string {
if (tokens) {
text = this.parser.parseInline(tokens, this.parser.textRenderer);
}
const cleanHref = cleanUrl(href); const cleanHref = cleanUrl(href);
if (cleanHref === null) { if (cleanHref === null) {
return escape(text); return escape(text);

View File

@ -14,26 +14,17 @@ function outputLink(cap: string[], link: Pick<Tokens.Link, 'href' | 'title'>, ra
const title = link.title || null; const title = link.title || null;
const text = cap[1].replace(rules.other.outputLinkReplace, '$1'); const text = cap[1].replace(rules.other.outputLinkReplace, '$1');
if (cap[0].charAt(0) !== '!') { lexer.state.inLink = true;
lexer.state.inLink = true; const token: Tokens.Link | Tokens.Image = {
const token: Tokens.Link = { type: cap[0].charAt(0) === '!' ? 'image' : 'link',
type: 'link',
raw,
href,
title,
text,
tokens: lexer.inlineTokens(text),
};
lexer.state.inLink = false;
return token;
}
return {
type: 'image',
raw, raw,
href, href,
title, title,
text, text,
tokens: lexer.inlineTokens(text),
}; };
lexer.state.inLink = false;
return token;
} }
function indentCodeCompensation(raw: string, text: string, rules: Rules) { function indentCodeCompensation(raw: string, text: string, rules: Rules) {
@ -636,6 +627,11 @@ export class _Tokenizer {
} else { } else {
// find closing parenthesis // find closing parenthesis
const lastParenIndex = findClosingBracket(cap[2], '()'); const lastParenIndex = findClosingBracket(cap[2], '()');
if (lastParenIndex === -2) {
// more open parens than closed
return;
}
if (lastParenIndex > -1) { if (lastParenIndex > -1) {
const start = cap[0].indexOf('!') === 0 ? 5 : 4; const start = cap[0].indexOf('!') === 0 ? 5 : 4;
const linkLen = start + cap[1].length + lastParenIndex; const linkLen = start + cap[1].length + lastParenIndex;

View File

@ -123,6 +123,7 @@ export namespace Tokens {
href: string; href: string;
title: string | null; title: string | null;
text: string; text: string;
tokens: Token[];
} }
export interface Link { export interface Link {

View File

@ -141,5 +141,9 @@ export function findClosingBracket(str: string, b: string) {
} }
} }
} }
if (level > 0) {
return -2;
}
return -1; return -1;
} }

View File

@ -85,13 +85,24 @@ const fences = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\
const hr = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/; const hr = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/;
const heading = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/; const heading = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/;
const bullet = /(?:[*+-]|\d{1,9}[.)])/; const bullet = /(?:[*+-]|\d{1,9}[.)])/;
const lheading = edit(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/) const lheadingCore = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/;
const lheading = edit(lheadingCore)
.replace(/bull/g, bullet) // lists can interrupt .replace(/bull/g, bullet) // lists can interrupt
.replace(/blockCode/g, /(?: {4}| {0,3}\t)/) // indented code blocks can interrupt .replace(/blockCode/g, /(?: {4}| {0,3}\t)/) // indented code blocks can interrupt
.replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/) // fenced code blocks can interrupt .replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/) // fenced code blocks can interrupt
.replace(/blockquote/g, / {0,3}>/) // blockquote can interrupt .replace(/blockquote/g, / {0,3}>/) // blockquote can interrupt
.replace(/heading/g, / {0,3}#{1,6}/) // ATX heading can interrupt .replace(/heading/g, / {0,3}#{1,6}/) // ATX heading can interrupt
.replace(/html/g, / {0,3}<[^\n>]+>\n/) // block html can interrupt .replace(/html/g, / {0,3}<[^\n>]+>\n/) // block html can interrupt
.replace(/\|table/g, '') // table not in commonmark
.getRegex();
const lheadingGfm = edit(lheadingCore)
.replace(/bull/g, bullet) // lists can interrupt
.replace(/blockCode/g, /(?: {4}| {0,3}\t)/) // indented code blocks can interrupt
.replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/) // fenced code blocks can interrupt
.replace(/blockquote/g, / {0,3}>/) // blockquote can interrupt
.replace(/heading/g, / {0,3}#{1,6}/) // ATX heading can interrupt
.replace(/html/g, / {0,3}<[^\n>]+>\n/) // block html can interrupt
.replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/) // table can interrupt
.getRegex(); .getRegex();
const _paragraph = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/; const _paragraph = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/;
const blockText = /^[^\n]+/; const blockText = /^[^\n]+/;
@ -186,6 +197,7 @@ const gfmTable = edit(
const blockGfm: Record<BlockKeys, RegExp> = { const blockGfm: Record<BlockKeys, RegExp> = {
...blockNormal, ...blockNormal,
lheading: lheadingGfm,
table: gfmTable, table: gfmTable,
paragraph: edit(_paragraph) paragraph: edit(_paragraph)
.replace('hr', hr) .replace('hr', hr)
@ -249,14 +261,25 @@ const _notPunctuationOrSpace = /[^\s\p{P}\p{S}]/u;
const punctuation = edit(/^((?![*_])punctSpace)/, 'u') const punctuation = edit(/^((?![*_])punctSpace)/, 'u')
.replace(/punctSpace/g, _punctuationOrSpace).getRegex(); .replace(/punctSpace/g, _punctuationOrSpace).getRegex();
// GFM allows ~ inside strong and em for strikethrough
const _punctuationGfmStrongEm = /(?!~)[\p{P}\p{S}]/u;
const _punctuationOrSpaceGfmStrongEm = /(?!~)[\s\p{P}\p{S}]/u;
const _notPunctuationOrSpaceGfmStrongEm = /(?:[^\s\p{P}\p{S}]|~)/u;
// sequences em should skip over [title](link), `code`, <html> // sequences em should skip over [title](link), `code`, <html>
const blockSkip = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g; const blockSkip = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g;
const emStrongLDelim = edit(/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, 'u') const emStrongLDelimCore = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/;
const emStrongLDelim = edit(emStrongLDelimCore, 'u')
.replace(/punct/g, _punctuation) .replace(/punct/g, _punctuation)
.getRegex(); .getRegex();
const emStrongRDelimAst = edit( const emStrongLDelimGfm = edit(emStrongLDelimCore, 'u')
.replace(/punct/g, _punctuationGfmStrongEm)
.getRegex();
const emStrongRDelimAstCore =
'^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)' // Skip orphan inside strong '^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)' // Skip orphan inside strong
+ '|[^*]+(?=[^*])' // Consume to delim + '|[^*]+(?=[^*])' // Consume to delim
+ '|(?!\\*)punct(\\*+)(?=[\\s]|$)' // (1) #*** can only be a Right Delimiter + '|(?!\\*)punct(\\*+)(?=[\\s]|$)' // (1) #*** can only be a Right Delimiter
@ -264,12 +287,20 @@ const emStrongRDelimAst = edit(
+ '|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)' // (3) #***a, ***a can only be Left Delimiter + '|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)' // (3) #***a, ***a can only be Left Delimiter
+ '|[\\s](\\*+)(?!\\*)(?=punct)' // (4) ***# can only be Left Delimiter + '|[\\s](\\*+)(?!\\*)(?=punct)' // (4) ***# can only be Left Delimiter
+ '|(?!\\*)punct(\\*+)(?!\\*)(?=punct)' // (5) #***# can be either Left or Right Delimiter + '|(?!\\*)punct(\\*+)(?!\\*)(?=punct)' // (5) #***# can be either Left or Right Delimiter
+ '|notPunctSpace(\\*+)(?=notPunctSpace)', 'gu') // (6) a***a can be either Left or Right Delimiter + '|notPunctSpace(\\*+)(?=notPunctSpace)'; // (6) a***a can be either Left or Right Delimiter
const emStrongRDelimAst = edit(emStrongRDelimAstCore, 'gu')
.replace(/notPunctSpace/g, _notPunctuationOrSpace) .replace(/notPunctSpace/g, _notPunctuationOrSpace)
.replace(/punctSpace/g, _punctuationOrSpace) .replace(/punctSpace/g, _punctuationOrSpace)
.replace(/punct/g, _punctuation) .replace(/punct/g, _punctuation)
.getRegex(); .getRegex();
const emStrongRDelimAstGfm = edit(emStrongRDelimAstCore, 'gu')
.replace(/notPunctSpace/g, _notPunctuationOrSpaceGfmStrongEm)
.replace(/punctSpace/g, _punctuationOrSpaceGfmStrongEm)
.replace(/punct/g, _punctuationGfmStrongEm)
.getRegex();
// (6) Not allowed for _ // (6) Not allowed for _
const emStrongRDelimUnd = edit( const emStrongRDelimUnd = edit(
'^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)' // Skip orphan inside strong '^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)' // Skip orphan inside strong
@ -307,9 +338,9 @@ const tag = edit(
const _inlineLabel = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/; const _inlineLabel = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;
const link = edit(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/) const link = edit(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/)
.replace('label', _inlineLabel) .replace('label', _inlineLabel)
.replace('href', /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/) .replace('href', /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/)
.replace('title', /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/) .replace('title', /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/)
.getRegex(); .getRegex();
@ -375,7 +406,8 @@ const inlinePedantic: Record<InlineKeys, RegExp> = {
const inlineGfm: Record<InlineKeys, RegExp> = { const inlineGfm: Record<InlineKeys, RegExp> = {
...inlineNormal, ...inlineNormal,
escape: edit(escape).replace('])', '~|])').getRegex(), emStrongRDelimAst: emStrongRDelimAstGfm,
emStrongLDelim: emStrongLDelimGfm,
url: edit(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, 'i') url: edit(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, 'i')
.replace('email', /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/) .replace('email', /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/)
.getRegex(), .getRegex(),

6
test/cjs-test.cjs vendored Normal file
View File

@ -0,0 +1,6 @@
// eslint-disable-next-line @typescript-eslint/no-require-imports
const { marked } = require('../lib/marked.cjs');
if (!marked.parse('# test').includes('<h1')) {
throw new Error('Invalid markdown');
}

View File

@ -3975,8 +3975,7 @@
"example": 497, "example": 497,
"start_line": 7666, "start_line": 7666,
"end_line": 7670, "end_line": 7670,
"section": "Links", "section": "Links"
"shouldFail": true
}, },
{ {
"markdown": "[link](foo\\(and\\(bar\\))\n", "markdown": "[link](foo\\(and\\(bar\\))\n",
@ -4057,8 +4056,7 @@
"example": 507, "example": 507,
"start_line": 7776, "start_line": 7776,
"end_line": 7780, "end_line": 7780,
"section": "Links", "section": "Links"
"shouldFail": true
}, },
{ {
"markdown": "[link](/url \"title \"and\" title\")\n", "markdown": "[link](/url \"title \"and\" title\")\n",
@ -4598,8 +4596,7 @@
"example": 573, "example": 573,
"start_line": 8548, "start_line": 8548,
"end_line": 8554, "end_line": 8554,
"section": "Images", "section": "Images"
"shouldFail": true
}, },
{ {
"markdown": "![foo ![bar](/url)](/url2)\n", "markdown": "![foo ![bar](/url)](/url2)\n",
@ -4607,8 +4604,7 @@
"example": 574, "example": 574,
"start_line": 8557, "start_line": 8557,
"end_line": 8561, "end_line": 8561,
"section": "Images", "section": "Images"
"shouldFail": true
}, },
{ {
"markdown": "![foo [bar](/url)](/url2)\n", "markdown": "![foo [bar](/url)](/url2)\n",
@ -4616,8 +4612,7 @@
"example": 575, "example": 575,
"start_line": 8564, "start_line": 8564,
"end_line": 8568, "end_line": 8568,
"section": "Images", "section": "Images"
"shouldFail": true
}, },
{ {
"markdown": "![foo *bar*][]\n\n[foo *bar*]: train.jpg \"train & tracks\"\n", "markdown": "![foo *bar*][]\n\n[foo *bar*]: train.jpg \"train & tracks\"\n",
@ -4625,8 +4620,7 @@
"example": 576, "example": 576,
"start_line": 8578, "start_line": 8578,
"end_line": 8584, "end_line": 8584,
"section": "Images", "section": "Images"
"shouldFail": true
}, },
{ {
"markdown": "![foo *bar*][foobar]\n\n[FOOBAR]: train.jpg \"train & tracks\"\n", "markdown": "![foo *bar*][foobar]\n\n[FOOBAR]: train.jpg \"train & tracks\"\n",
@ -4634,8 +4628,7 @@
"example": 577, "example": 577,
"start_line": 8587, "start_line": 8587,
"end_line": 8593, "end_line": 8593,
"section": "Images", "section": "Images"
"shouldFail": true
}, },
{ {
"markdown": "![foo](train.jpg)\n", "markdown": "![foo](train.jpg)\n",
@ -4699,8 +4692,7 @@
"example": 585, "example": 585,
"start_line": 8655, "start_line": 8655,
"end_line": 8661, "end_line": 8661,
"section": "Images", "section": "Images"
"shouldFail": true
}, },
{ {
"markdown": "![Foo][]\n\n[foo]: /url \"title\"\n", "markdown": "![Foo][]\n\n[foo]: /url \"title\"\n",
@ -4732,8 +4724,7 @@
"example": 589, "example": 589,
"start_line": 8700, "start_line": 8700,
"end_line": 8706, "end_line": 8706,
"section": "Images", "section": "Images"
"shouldFail": true
}, },
{ {
"markdown": "![[foo]]\n\n[[foo]]: /url \"title\"\n", "markdown": "![[foo]]\n\n[[foo]]: /url \"title\"\n",

View File

@ -3975,8 +3975,7 @@
"example": 497, "example": 497,
"start_line": 7666, "start_line": 7666,
"end_line": 7670, "end_line": 7670,
"section": "Links", "section": "Links"
"shouldFail": true
}, },
{ {
"markdown": "[link](foo\\(and\\(bar\\))\n", "markdown": "[link](foo\\(and\\(bar\\))\n",
@ -4057,8 +4056,7 @@
"example": 507, "example": 507,
"start_line": 7776, "start_line": 7776,
"end_line": 7780, "end_line": 7780,
"section": "Links", "section": "Links"
"shouldFail": true
}, },
{ {
"markdown": "[link](/url \"title \"and\" title\")\n", "markdown": "[link](/url \"title \"and\" title\")\n",
@ -4598,8 +4596,7 @@
"example": 573, "example": 573,
"start_line": 8548, "start_line": 8548,
"end_line": 8554, "end_line": 8554,
"section": "Images", "section": "Images"
"shouldFail": true
}, },
{ {
"markdown": "![foo ![bar](/url)](/url2)\n", "markdown": "![foo ![bar](/url)](/url2)\n",
@ -4607,8 +4604,7 @@
"example": 574, "example": 574,
"start_line": 8557, "start_line": 8557,
"end_line": 8561, "end_line": 8561,
"section": "Images", "section": "Images"
"shouldFail": true
}, },
{ {
"markdown": "![foo [bar](/url)](/url2)\n", "markdown": "![foo [bar](/url)](/url2)\n",
@ -4616,8 +4612,7 @@
"example": 575, "example": 575,
"start_line": 8564, "start_line": 8564,
"end_line": 8568, "end_line": 8568,
"section": "Images", "section": "Images"
"shouldFail": true
}, },
{ {
"markdown": "![foo *bar*][]\n\n[foo *bar*]: train.jpg \"train & tracks\"\n", "markdown": "![foo *bar*][]\n\n[foo *bar*]: train.jpg \"train & tracks\"\n",
@ -4625,8 +4620,7 @@
"example": 576, "example": 576,
"start_line": 8578, "start_line": 8578,
"end_line": 8584, "end_line": 8584,
"section": "Images", "section": "Images"
"shouldFail": true
}, },
{ {
"markdown": "![foo *bar*][foobar]\n\n[FOOBAR]: train.jpg \"train & tracks\"\n", "markdown": "![foo *bar*][foobar]\n\n[FOOBAR]: train.jpg \"train & tracks\"\n",
@ -4634,8 +4628,7 @@
"example": 577, "example": 577,
"start_line": 8587, "start_line": 8587,
"end_line": 8593, "end_line": 8593,
"section": "Images", "section": "Images"
"shouldFail": true
}, },
{ {
"markdown": "![foo](train.jpg)\n", "markdown": "![foo](train.jpg)\n",
@ -4699,8 +4692,7 @@
"example": 585, "example": 585,
"start_line": 8655, "start_line": 8655,
"end_line": 8661, "end_line": 8661,
"section": "Images", "section": "Images"
"shouldFail": true
}, },
{ {
"markdown": "![Foo][]\n\n[foo]: /url \"title\"\n", "markdown": "![Foo][]\n\n[foo]: /url \"title\"\n",
@ -4732,8 +4724,7 @@
"example": 589, "example": 589,
"start_line": 8700, "start_line": 8700,
"end_line": 8706, "end_line": 8706,
"section": "Images", "section": "Images"
"shouldFail": true
}, },
{ {
"markdown": "![[foo]]\n\n[[foo]]: /url \"title\"\n", "markdown": "![[foo]]\n\n[[foo]]: /url \"title\"\n",

View File

@ -0,0 +1,9 @@
<p><em>italics</em></p>
<p><strong>bold</strong></p>
<p><em><strong>bold italics</strong></em></p>
<p><code>*quoted italics*</code></p>
<p><code>**quoted bold**</code></p>
<p><code>***quoted bold italics***</code></p>
<p>`<em>escaped quoted italics</em>`</p>
<p>`<strong>escaped quoted bold</strong>`</p>
<p>`<em><strong>escaped quoted bold italics</strong></em>`</p>

View File

@ -0,0 +1,17 @@
*italics*
**bold**
***bold italics***
`*quoted italics*`
`**quoted bold**`
`***quoted bold italics***`
\`*escaped quoted italics*\`
\`**escaped quoted bold**\`
\`***escaped quoted bold italics***\`

View File

@ -17,3 +17,44 @@
</tbody> </tbody>
</table> </table>
<hr> <hr>
<table>
<thead>
<tr>
<th>abc</th>
<th>def</th>
</tr>
</thead>
<tbody>
<tr>
<td>bar</td>
<td>foo</td>
</tr>
<tr>
<td>baz</td>
<td>boo</td>
</tr>
</tbody>
</table>
<hr>
<p>text then table</p>
<table>
<thead>
<tr>
<th>abc</th>
<th>def</th>
</tr>
</thead>
<tbody>
<tr>
<td>bar</td>
<td>foo</td>
</tr>
<tr>
<td>baz</td>
<td>boo</td>
</tr>
</tbody>
</table>
<hr>

View File

@ -3,3 +3,16 @@
bar | foo bar | foo
baz | boo baz | boo
___ ___
abc | def
--- | ---
bar | foo
baz | boo
---
text then table
abc | def
--- | ---
bar | foo
baz | boo
---

View File

@ -17,3 +17,44 @@
</tbody> </tbody>
</table> </table>
<hr> <hr>
<table>
<thead>
<tr>
<th>abc</th>
<th>def</th>
</tr>
</thead>
<tbody>
<tr>
<td>bar</td>
<td>foo</td>
</tr>
<tr>
<td>baz</td>
<td>boo</td>
</tr>
</tbody>
</table>
<hr>
<p>text then table</p>
<table>
<thead>
<tr>
<th>abc</th>
<th>def</th>
</tr>
</thead>
<tbody>
<tr>
<td>bar</td>
<td>foo</td>
</tr>
<tr>
<td>baz</td>
<td>boo</td>
</tr>
</tbody>
</table>
<hr>

View File

@ -3,3 +3,16 @@
| bar | foo | | bar | foo |
| baz | boo | | baz | boo |
___ ___
| abc | def |
| --- | --- |
| bar | foo |
| baz | boo |
---
text then table
| abc | def |
| --- | --- |
| bar | foo |
| baz | boo |
---

View File

@ -0,0 +1,7 @@
<p>[link](foo(bar())</p>
<p><a href="foo(bar()">link</a></p>
<p><a href="foo(bar()">link</a></p>
<p>[link](foo(bar\())</p>

View File

@ -0,0 +1,7 @@
[link](foo(bar())
[link](foo\(bar())
[link](foo(bar\())
[link](foo(bar\\())

View File

@ -0,0 +1,47 @@
<p><em><del>a</del></em>b</p>
<p><em><del>a</del></em>b</p>
<p><strong><del>a</del></strong>b</p>
<p><strong><del>a</del></strong>b</p>
<p>_<del>a</del>_b</p>
<p>_<del>a</del>_b</p>
<p>__<del>a</del>__b</p>
<p>__<del>a</del>__b</p>
<p>b<em><del>a</del></em></p>
<p>b<em><del>a</del></em></p>
<p>b<strong><del>a</del></strong></p>
<p>b<strong><del>a</del></strong></p>
<p>b_<del>a</del>_</p>
<p>b_<del>a</del>_</p>
<p>b__<del>a</del>__</p>
<p>b__<del>a</del>__</p>
<p>b<em><del>a</del></em>b</p>
<p>b<em><del>a</del></em>b</p>
<p>b<strong><del>a</del></strong>b</p>
<p>b<strong><del>a</del></strong>b</p>
<p>b_<del>a</del>_b</p>
<p>b_<del>a</del>_b</p>
<p>b__<del>a</del>__b</p>
<p>b__<del>a</del>__b</p>

View File

@ -0,0 +1,47 @@
*~a~*b
*~~a~~*b
**~a~**b
**~~a~~**b
_~a~_b
_~~a~~_b
__~a~__b
__~~a~~__b
b*~a~*
b*~~a~~*
b**~a~**
b**~~a~~**
b_~a~_
b_~~a~~_
b__~a~__
b__~~a~~__
b*~a~*b
b*~~a~~*b
b**~a~**b
b**~~a~~**b
b_~a~_b
b_~~a~~_b
b__~a~__b
b__~~a~~__b

View File

@ -104,7 +104,7 @@ class ExtendedRenderer extends marked.Renderer {
br = ({ type, raw }: Tokens.Br): string => super.br({ type, raw }); br = ({ type, raw }: Tokens.Br): string => super.br({ type, raw });
del = ({ type, raw, text, tokens }: Tokens.Del): string => super.del({ type, raw, text, tokens }); del = ({ type, raw, text, tokens }: Tokens.Del): string => super.del({ type, raw, text, tokens });
link = ({ type, raw, href, title, text, tokens }: Tokens.Link): string => super.link({ type, raw, href, title, text, tokens }); link = ({ type, raw, href, title, text, tokens }: Tokens.Link): string => super.link({ type, raw, href, title, text, tokens });
image = ({ type, raw, href, title, text }: Tokens.Image): string => super.image({ type, raw, href, title, text }); image = ({ type, raw, href, title, text }: Tokens.Image): string => super.image({ type, raw, href, title, text, tokens });
} }
const rendererOptions: MarkedOptions = renderer.options; const rendererOptions: MarkedOptions = renderer.options;

View File

@ -1340,6 +1340,12 @@ paragraph
text: 'image', text: 'image',
href: 'https://example.com/image.png', href: 'https://example.com/image.png',
title: null, title: null,
tokens: [{
type: 'text',
raw: 'image',
text: 'image',
escaped: false,
}],
}, },
], ],
}); });
@ -1355,6 +1361,12 @@ paragraph
text: 'image', text: 'image',
href: 'https://example.com/image.png', href: 'https://example.com/image.png',
title: 'title', title: 'title',
tokens: [{
type: 'text',
raw: 'image',
text: 'image',
escaped: false,
}],
}, },
], ],
}); });

View File

@ -396,6 +396,12 @@ describe('Parser', () => {
text: 'image', text: 'image',
href: 'image.png', href: 'image.png',
title: 'title', title: 'title',
tokens: [{
type: 'text',
raw: 'image',
text: 'image',
escaped: false,
}],
}, },
], ],
html: '<img src="image.png" alt="image" title="title">', html: '<img src="image.png" alt="image" title="title">',

View File

@ -959,6 +959,7 @@ br
['space', ''], ['space', ''],
['paragraph', '![image](https://example.com/image.jpg)'], ['paragraph', '![image](https://example.com/image.jpg)'],
['image', '![image](https://example.com/image.jpg)'], ['image', '![image](https://example.com/image.jpg)'],
['text', 'image'],
['space', ''], ['space', ''],
['paragraph', '**strong**'], ['paragraph', '**strong**'],
['strong', '**strong**'], ['strong', '**strong**'],