Skip to content

Commit

Permalink
build [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkedJS bot committed Mar 22, 2020
1 parent 58e9fed commit 17ee15f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
7 changes: 7 additions & 0 deletions lib/marked.esm.js
Expand Up @@ -1143,6 +1143,9 @@ var Slugger_1 = class Slugger {
let slug = value
.toLowerCase()
.trim()
// remove html tags
.replace(/<[!\/a-z].*?>/ig, '')
// remove unwanted chars
.replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, '')
.replace(/\s/g, '-');

Expand Down Expand Up @@ -1474,6 +1477,10 @@ var TextRenderer_1 = class TextRenderer {
return text;
}

html(text) {
return text;
}

text(text) {
return text;
}
Expand Down
8 changes: 7 additions & 1 deletion lib/marked.js
Expand Up @@ -1049,7 +1049,9 @@
var _proto = Slugger.prototype;

_proto.slug = function slug(value) {
var slug = value.toLowerCase().trim().replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, '').replace(/\s/g, '-');
var slug = value.toLowerCase().trim() // remove html tags
.replace(/<[!\/a-z].*?>/ig, '') // remove unwanted chars
.replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, '').replace(/\s/g, '-');

if (this.seen.hasOwnProperty(slug)) {
var originalSlug = slug;
Expand Down Expand Up @@ -1401,6 +1403,10 @@
return text;
};

_proto.html = function html(text) {
return text;
};

_proto.text = function text(_text) {
return _text;
};
Expand Down

1 comment on commit 17ee15f

@vercel
Copy link

@vercel vercel bot commented on 17ee15f Mar 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.