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) {
|
InlineLexer.prototype.mangle = function(text) {
|
||||||
|
if (!this.options.mangle) return text;
|
||||||
var out = ''
|
var out = ''
|
||||||
, l = text.length
|
, l = text.length
|
||||||
, i = 0
|
, i = 0
|
||||||
@ -1232,6 +1233,7 @@ marked.defaults = {
|
|||||||
breaks: false,
|
breaks: false,
|
||||||
pedantic: false,
|
pedantic: false,
|
||||||
sanitize: false,
|
sanitize: false,
|
||||||
|
mangle: true,
|
||||||
smartLists: false,
|
smartLists: false,
|
||||||
silent: false,
|
silent: false,
|
||||||
highlight: null,
|
highlight: null,
|
||||||
|
@ -61,6 +61,9 @@ Use smarter list behavior than the original markdown.
|
|||||||
.BI \-\-lang\-prefix\ [\fIprefix\fP]
|
.BI \-\-lang\-prefix\ [\fIprefix\fP]
|
||||||
Set the prefix for code block classes.
|
Set the prefix for code block classes.
|
||||||
.TP
|
.TP
|
||||||
|
.BI \-\-mangle
|
||||||
|
Mangle email addresses.
|
||||||
|
.TP
|
||||||
.BI \-\-no\-sanitize,\ \-no-etc...
|
.BI \-\-no\-sanitize,\ \-no-etc...
|
||||||
The inverse of any of the marked options above.
|
The inverse of any of the marked options above.
|
||||||
.TP
|
.TP
|
||||||
|
Loading…
x
Reference in New Issue
Block a user