Add -mangle/-no-mangle to enable/disable mangling of email addresses.
To keep the "standard"/previous behaviour, mangling is on by default.
This commit is contained in:
parent
2b5802f258
commit
202fa62c3f
@ -730,6 +730,7 @@ InlineLexer.prototype.smartypants = function(text) {
|
||||
*/
|
||||
|
||||
InlineLexer.prototype.mangle = function(text) {
|
||||
if (!this.options.mangle) return text;
|
||||
var out = ''
|
||||
, l = text.length
|
||||
, i = 0
|
||||
@ -1232,6 +1233,7 @@ marked.defaults = {
|
||||
breaks: false,
|
||||
pedantic: false,
|
||||
sanitize: false,
|
||||
mangle: true,
|
||||
smartLists: false,
|
||||
silent: false,
|
||||
highlight: null,
|
||||
|
@ -61,6 +61,9 @@ Use smarter list behavior than the original markdown.
|
||||
.BI \-\-lang\-prefix\ [\fIprefix\fP]
|
||||
Set the prefix for code block classes.
|
||||
.TP
|
||||
.BI \-\-mangle
|
||||
Mangle email addresses.
|
||||
.TP
|
||||
.BI \-\-no\-sanitize,\ \-no-etc...
|
||||
The inverse of any of the marked options above.
|
||||
.TP
|
||||
|
Loading…
x
Reference in New Issue
Block a user