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.1
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.2
Choose a head ref
  • 4 commits
  • 9 files changed
  • 4 contributors

Commits on Aug 23, 2021

  1. chore(docs): Use langPrefix in highlight.js example. (#2176)

    To properly integrate [highlight.js](https://github.com/highlightjs/highlight.js/) when using `marked.setOptions`, you need to leverage `langPrefix` to add an additional `hljs` class to the top-level `<code>` element which will be rendered.
    
    Closes #2171
    theengineear authored Aug 23, 2021
    1

    Verified

    This commit was signed with the committer’s verified signature.
    bagder Daniel Stenberg
    Copy the full SHA
    e583f46 View commit details

Commits on Aug 25, 2021

  1. 1
    Copy the full SHA
    21268ab View commit details
  2. 🗜️ build [skip ci]

    MarkedJS bot committed Aug 25, 2021
    Copy the full SHA
    c0fb2ae View commit details
  3. chore(release): 3.0.2 [skip ci]

    ## [3.0.2](v3.0.1...v3.0.2) (2021-08-25)
    
    ### Bug Fixes
    
    * stop table at lines with only whitespace ([#2188](#2188)) ([21268ab](21268ab))
    semantic-release-bot committed Aug 25, 2021
    1
    Copy the full SHA
    d1b7d52 View commit details
Showing with 32 additions and 7 deletions.
  1. +1 −0 docs/USING_ADVANCED.md
  2. +1 −1 lib/marked.esm.js
  3. +1 −1 lib/marked.js
  4. +1 −1 marked.min.js
  5. +2 −2 package-lock.json
  6. +1 −1 package.json
  7. +1 −1 src/rules.js
  8. +16 −0 test/specs/new/space_after_table.html
  9. +8 −0 test/specs/new/space_after_table.md
1 change: 1 addition & 0 deletions docs/USING_ADVANCED.md
Original file line number Diff line number Diff line change
@@ -25,6 +25,7 @@ marked.setOptions({
const language = hljs.getLanguage(lang) ? lang : 'plaintext';
return hljs.highlight(code, { language }).value;
},
langPrefix: 'hljs language-', // highlight.js css expects a top-level 'hljs' class.
pedantic: false,
gfm: true,
breaks: false,
2 changes: 1 addition & 1 deletion lib/marked.esm.js
Original file line number Diff line number Diff line change
@@ -1162,7 +1162,7 @@ block$1.normal = merge$1({}, block$1);
block$1.gfm = merge$1({}, block$1.normal, {
table: '^ *([^\\n ].*\\|.*)\\n' // Header
+ ' {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)\\|?' // Align
+ '(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)' // Cells
+ '(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)' // Cells
});

block$1.gfm.table = edit(block$1.gfm.table)
2 changes: 1 addition & 1 deletion lib/marked.js
Original file line number Diff line number Diff line change
@@ -1268,7 +1268,7 @@
block$1.gfm = merge$1({}, block$1.normal, {
table: '^ *([^\\n ].*\\|.*)\\n' // Header
+ ' {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)\\|?' // Align
+ '(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)' // Cells
+ '(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)' // Cells

});
block$1.gfm.table = edit(block$1.gfm.table).replace('hr', block$1.hr).replace('heading', ' {0,3}#{1,6} ').replace('blockquote', ' {0,3}>').replace('code', ' {4}[^\\n]').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt
Loading