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.7
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.8
Choose a head ref
  • 11 commits
  • 8 files changed
  • 4 contributors

Commits on Oct 11, 2021

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

    Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.15.6 to 7.15.8.
    - [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.8/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 Oct 11, 2021
    1

    Verified

    This commit was signed with the committer’s verified signature.
    bagder Daniel Stenberg
    Copy the full SHA
    3fb4166 View commit details
  2. chore(deps-dev): Bump rollup-plugin-license from 2.5.0 to 2.6.0 (#2237)

    Bumps [rollup-plugin-license](https://github.com/mjeanroy/rollup-plugin-license) from 2.5.0 to 2.6.0.
    - [Release notes](https://github.com/mjeanroy/rollup-plugin-license/releases)
    - [Changelog](https://github.com/mjeanroy/rollup-plugin-license/blob/master/CHANGELOG.md)
    - [Commits](mjeanroy/rollup-plugin-license@v2.5.0...v2.6.0)
    
    ---
    updated-dependencies:
    - dependency-name: rollup-plugin-license
      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>
    dependabot[bot] authored Oct 11, 2021
    1
    Copy the full SHA
    4ee1053 View commit details
  3. chore(deps-dev): Bump @babel/core from 7.15.5 to 7.15.8 (#2236)

    Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.15.5 to 7.15.8.
    - [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.8/packages/babel-core)
    
    ---
    updated-dependencies:
    - dependency-name: "@babel/core"
      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 Oct 11, 2021
    1
    Copy the full SHA
    de7a5d6 View commit details

Commits on Oct 13, 2021

  1. chore(deps-dev): Bump eslint from 7.32.0 to 8.0.0 (#2235)

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Tony Brix <tony@brix.ninja>
    dependabot[bot] and UziTech authored Oct 13, 2021
    1
    Copy the full SHA
    1d886aa View commit details

Commits on Oct 18, 2021

  1. chore(deps-dev): Bump @semantic-release/npm from 8.0.0 to 8.0.1 (#2246)

    Bumps [@semantic-release/npm](https://github.com/semantic-release/npm) from 8.0.0 to 8.0.1.
    - [Release notes](https://github.com/semantic-release/npm/releases)
    - [Commits](semantic-release/npm@v8.0.0...v8.0.1)
    
    ---
    updated-dependencies:
    - dependency-name: "@semantic-release/npm"
      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 Oct 18, 2021
    1
    Copy the full SHA
    d78820e View commit details
  2. chore(deps-dev): Bump jasmine from 3.9.0 to 3.10.0 (#2245)

    Bumps [jasmine](https://github.com/jasmine/jasmine-npm) from 3.9.0 to 3.10.0.
    - [Release notes](https://github.com/jasmine/jasmine-npm/releases)
    - [Commits](jasmine/jasmine-npm@v3.9.0...v3.10.0)
    
    ---
    updated-dependencies:
    - dependency-name: jasmine
      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>
    dependabot[bot] authored Oct 18, 2021
    1
    Copy the full SHA
    90e41bb View commit details
  3. chore(deps-dev): Bump eslint from 8.0.0 to 8.0.1 (#2243)

    Bumps [eslint](https://github.com/eslint/eslint) from 8.0.0 to 8.0.1.
    - [Release notes](https://github.com/eslint/eslint/releases)
    - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
    - [Commits](eslint/eslint@v8.0.0...v8.0.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>
    dependabot[bot] authored Oct 18, 2021
    1
    Copy the full SHA
    9d4971f View commit details

Commits on Oct 23, 2021

  1. chore(deps-dev): Bump highlight.js from 11.2.0 to 11.3.1 (#2244)

    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Oct 23, 2021
    1
    Copy the full SHA
    40b33d0 View commit details

Commits on Oct 24, 2021

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

    MarkedJS bot committed Oct 24, 2021
    Copy the full SHA
    48e5bd0 View commit details
  3. chore(release): 3.0.8 [skip ci]

    ## [3.0.8](v3.0.7...v3.0.8) (2021-10-24)
    
    ### Bug Fixes
    
    * walkTokens uses marked as this ([#2251](#2251)) ([2da5885](2da5885))
    semantic-release-bot committed Oct 24, 2021
    1
    Copy the full SHA
    d7f5e68 View commit details
Showing with 1,003 additions and 1,608 deletions.
  1. +11 −9 docs/USING_PRO.md
  2. +3 −3 lib/marked.esm.js
  3. +3 −5 lib/marked.js
  4. +1 −1 marked.min.js
  5. +961 −1,578 package-lock.json
  6. +9 −9 package.json
  7. +3 −3 src/marked.js
  8. +12 −0 test/unit/marked-spec.js
20 changes: 11 additions & 9 deletions docs/USING_PRO.md
Original file line number Diff line number Diff line change
@@ -406,19 +406,21 @@ const description = {
return `\n<dt>${this.parser.parseInline(token.dt)}</dt><dd>${this.parser.parseInline(token.dd)}</dd>`;
},
childTokens: ['dt', 'dd'], // Any child tokens to be visited by walkTokens
walkTokens(token) { // Post-processing on the completed token tree
if (token.type === 'strong') {
token.text += ' walked';
}
}
};

marked.use({ extensions: [descriptionlist, description] });
function walkTokens(token) { // Post-processing on the completed token tree
if (token.type === 'strong') {
token.text += ' walked';
token.tokens = this.Lexer.lexInline(token.text)
}
}
marked.use({ extensions: [descriptionlist, description], walkTokens });

\\ EQUIVALENT TO:
// EQUIVALENT TO:

marked.use({extensions: [descriptionList] });
marked.use({extensions: [description] });
marked.use({ extensions: [descriptionList] });
marked.use({ extensions: [description] });
marked.use({ walkTokens })

console.log(marked('A Description List:\n'
+ ': Topic 1 : Description 1\n'
6 changes: 3 additions & 3 deletions lib/marked.esm.js
Original file line number Diff line number Diff line change
@@ -2638,10 +2638,10 @@ marked$1.use = function(...args) {
// ==-- Parse WalkTokens extensions --== //
if (pack.walkTokens) {
const walkTokens = marked$1.defaults.walkTokens;
opts.walkTokens = (token) => {
opts.walkTokens = function(token) {
pack.walkTokens.call(this, token);
if (walkTokens) {
walkTokens(token);
walkTokens.call(this, token);
}
};
}
@@ -2660,7 +2660,7 @@ marked$1.use = function(...args) {

marked$1.walkTokens = function(tokens, callback) {
for (const token of tokens) {
callback(token);
callback.call(marked$1, token);
switch (token.type) {
case 'table': {
for (const cell of token.header) {
8 changes: 3 additions & 5 deletions lib/marked.js
Original file line number Diff line number Diff line change
@@ -2696,8 +2696,6 @@
*/

marked.use = function () {
var _this = this;

for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
@@ -2844,10 +2842,10 @@
var walkTokens = marked.defaults.walkTokens;

opts.walkTokens = function (token) {
pack.walkTokens.call(_this, token);
pack.walkTokens.call(this, token);

if (walkTokens) {
walkTokens(token);
walkTokens.call(this, token);
}
};
}
@@ -2867,7 +2865,7 @@
marked.walkTokens = function (tokens, callback) {
var _loop3 = function _loop3() {
var token = _step.value;
callback(token);
callback.call(marked, token);

switch (token.type) {
case 'table':
Loading