Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: markedjs/marked
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.0.3
Choose a base ref
...
head repository: markedjs/marked
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.0.4
Choose a head ref
  • 6 commits
  • 10 files changed
  • 5 contributors

Commits on Sep 13, 2021

  1. chore(deps-dev): Bump @babel/preset-env from 7.15.4 to 7.15.6 (#2205)

    Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.15.4 to 7.15.6.
    - [Release notes](https://github.com/babel/babel/releases)
    - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
    - [Commits](https://github.com/babel/babel/commits/v7.15.6/packages/babel-preset-env)
    
    ---
    updated-dependencies:
    - dependency-name: "@babel/preset-env"
      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>
    dependabot[bot] authored Sep 13, 2021
    1

    Verified

    This commit was signed with the committer’s verified signature.
    bagder Daniel Stenberg
    Copy the full SHA
    ffd567d View commit details
  2. chore(deps-dev): Bump uglify-js from 3.14.1 to 3.14.2 (#2204)

    Bumps [uglify-js](https://github.com/mishoo/UglifyJS) from 3.14.1 to 3.14.2.
    - [Release notes](https://github.com/mishoo/UglifyJS/releases)
    - [Commits](mishoo/UglifyJS@v3.14.1...v3.14.2)
    
    ---
    updated-dependencies:
    - dependency-name: uglify-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>
    dependabot[bot] authored Sep 13, 2021
    1
    Copy the full SHA
    c1d55ae View commit details

Commits on Sep 14, 2021

  1. 1
    Copy the full SHA
    7792adc View commit details
  2. 1
    Copy the full SHA
    8c00ed3 View commit details
  3. 🗜️ build [skip ci]

    MarkedJS bot committed Sep 14, 2021
    Copy the full SHA
    f532739 View commit details
  4. chore(release): 3.0.4 [skip ci]

    ## [3.0.4](v3.0.3...v3.0.4) (2021-09-14)
    
    ### Bug Fixes
    
    * fix detection of orphaned emStrong delimiters ([#2206](#2206)) ([8c00ed3](8c00ed3))
    semantic-release-bot committed Sep 14, 2021
    1
    Copy the full SHA
    189fef4 View commit details
6 changes: 3 additions & 3 deletions lib/marked.esm.js
Original file line number Diff line number Diff line change
@@ -1225,9 +1225,9 @@ const inline$1 = {
emStrong: {
lDelim: /^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,
// (1) and (2) can only be a Right Delimiter. (3) and (4) can only be Left. (5) and (6) can be either Left or Right.
// () Skip other delimiter (1) #*** (2) a***#, a*** (3) #***a, ***a (4) ***# (5) #***# (6) a***a
rDelimAst: /\_\_[^_*]*?\*[^_*]*?\_\_|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,
rDelimUnd: /\*\*[^_*]*?\_[^_*]*?\*\*|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/ // ^- Not allowed for _
// () Skip orphan delim inside strong (1) #*** (2) a***#, a*** (3) #***a, ***a (4) ***# (5) #***# (6) a***a
rDelimAst: /^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,
rDelimUnd: /^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/ // ^- Not allowed for _
},
code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,
br: /^( {2,}|\\)\n(?!\s*$)/,
6 changes: 3 additions & 3 deletions lib/marked.js
Original file line number Diff line number Diff line change
@@ -1308,9 +1308,9 @@
emStrong: {
lDelim: /^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,
// (1) and (2) can only be a Right Delimiter. (3) and (4) can only be Left. (5) and (6) can be either Left or Right.
// () Skip other delimiter (1) #*** (2) a***#, a*** (3) #***a, ***a (4) ***# (5) #***# (6) a***a
rDelimAst: /\_\_[^_*]*?\*[^_*]*?\_\_|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,
rDelimUnd: /\*\*[^_*]*?\_[^_*]*?\*\*|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/ // ^- Not allowed for _
// () Skip orphan delim inside strong (1) #*** (2) a***#, a*** (3) #***a, ***a (4) ***# (5) #***# (6) a***a
rDelimAst: /^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,
rDelimUnd: /^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/ // ^- Not allowed for _

},
code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,
2 changes: 1 addition & 1 deletion marked.min.js

Large diffs are not rendered by default.

76 changes: 38 additions & 38 deletions package-lock.json
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
"name": "marked",
"description": "A markdown parser built for speed",
"author": "Christopher Jeffrey",
"version": "3.0.3",
"version": "3.0.4",
"main": "./src/marked.js",
"module": "./lib/marked.esm.js",
"browser": "./lib/marked.js",
@@ -35,7 +35,7 @@
],
"devDependencies": {
"@babel/core": "^7.15.5",
"@babel/preset-env": "^7.15.4",
"@babel/preset-env": "^7.15.6",
"@markedjs/html-differ": "^3.0.4",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^20.0.0",
@@ -60,7 +60,7 @@
"rollup-plugin-license": "^2.5.0",
"semantic-release": "^17.4.7",
"titleize": "^2.1.0",
"uglify-js": "^3.14.1",
"uglify-js": "^3.14.2",
"vuln-regex-detector": "^1.3.0"
},
"scripts": {
6 changes: 3 additions & 3 deletions src/rules.js
Original file line number Diff line number Diff line change
@@ -156,9 +156,9 @@ const inline = {
emStrong: {
lDelim: /^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,
// (1) and (2) can only be a Right Delimiter. (3) and (4) can only be Left. (5) and (6) can be either Left or Right.
// () Skip other delimiter (1) #*** (2) a***#, a*** (3) #***a, ***a (4) ***# (5) #***# (6) a***a
rDelimAst: /\_\_[^_*]*?\*[^_*]*?\_\_|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,
rDelimUnd: /\*\*[^_*]*?\_[^_*]*?\*\*|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/ // ^- Not allowed for _
// () Skip orphan delim inside strong (1) #*** (2) a***#, a*** (3) #***a, ***a (4) ***# (5) #***# (6) a***a
rDelimAst: /^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,
rDelimUnd: /^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/ // ^- Not allowed for _
},
code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,
br: /^( {2,}|\\)\n(?!\s*$)/,
7 changes: 7 additions & 0 deletions test/specs/new/em_strong_adjacent_mixed.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<p><em><strong>foo</strong></em> <strong>bar</strong></p>

<p><em><strong>foo</strong></em> <strong>bar</strong> <em><strong>foo</strong></em></p>

<p><em><strong>foo</strong></em> <strong>bar</strong></p>

<p><em><strong>foo</strong></em> <strong>bar</strong> <em><strong>foo</strong></em></p>
7 changes: 7 additions & 0 deletions test/specs/new/em_strong_adjacent_mixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
_**foo**_ **bar**

_**foo**_ **bar** _**foo**_

*__foo__* __bar__

*__foo__* __bar__ *__foo__*
1 change: 1 addition & 0 deletions test/specs/new/em_strong_orphaned_nesting.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p><em><strong>foo_bar</strong></em></p>
1 change: 1 addition & 0 deletions test/specs/new/em_strong_orphaned_nesting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_**foo_bar**_