mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
rebuild
This commit is contained in:
commit
6ee6d8c9d9
BIN
dist/showdown.js
vendored
BIN
dist/showdown.js
vendored
Binary file not shown.
BIN
dist/showdown.js.map
vendored
BIN
dist/showdown.js.map
vendored
Binary file not shown.
BIN
dist/showdown.min.js
vendored
BIN
dist/showdown.min.js
vendored
Binary file not shown.
BIN
dist/showdown.min.js.map
vendored
BIN
dist/showdown.min.js.map
vendored
Binary file not shown.
|
@ -8,11 +8,17 @@ showdown.subParser('makehtml.underline', function (text, options, globals) {
|
||||||
text = globals.converter._dispatch('makehtml.underline.before', text, options, globals).getText();
|
text = globals.converter._dispatch('makehtml.underline.before', text, options, globals).getText();
|
||||||
|
|
||||||
if (options.literalMidWordUnderscores) {
|
if (options.literalMidWordUnderscores) {
|
||||||
text = text.replace(/\b_?__(\S[\s\S]*)___?\b/g, function (wm, txt) {
|
text = text.replace(/\b___(\S[\s\S]*?)___\b/g, function (wm, txt) {
|
||||||
|
return '<u>' + txt + '</u>';
|
||||||
|
});
|
||||||
|
text = text.replace(/\b__(\S[\s\S]*?)__\b/g, function (wm, txt) {
|
||||||
return '<u>' + txt + '</u>';
|
return '<u>' + txt + '</u>';
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
text = text.replace(/_?__(\S[\s\S]*?)___?/g, function (wm, m) {
|
text = text.replace(/___(\S[\s\S]*?)___/g, function (wm, m) {
|
||||||
|
return (/\S$/.test(m)) ? '<u>' + m + '</u>' : wm;
|
||||||
|
});
|
||||||
|
text = text.replace(/__(\S[\s\S]*?)__/g, function (wm, m) {
|
||||||
return (/\S$/.test(m)) ? '<u>' + m + '</u>' : wm;
|
return (/\S$/.test(m)) ? '<u>' + m + '</u>' : wm;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,3 +2,4 @@
|
||||||
<p><u>an underlined sentence</u></p>
|
<p><u>an underlined sentence</u></p>
|
||||||
<p><u>three underscores are fine</u></p>
|
<p><u>three underscores are fine</u></p>
|
||||||
<p>_single_ underscores are left alone</p>
|
<p>_single_ underscores are left alone</p>
|
||||||
|
<p><u>multiple</u> underlines in a <u>paragraph</u></p>
|
|
@ -5,3 +5,5 @@ __an underlined sentence__
|
||||||
___three underscores are fine___
|
___three underscores are fine___
|
||||||
|
|
||||||
_single_ underscores are left alone
|
_single_ underscores are left alone
|
||||||
|
|
||||||
|
__multiple__ underlines in a __paragraph__
|
Loading…
Reference in New Issue
Block a user