mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
Merge branch 'master' of https://github.com/showdownjs/showdown
# Conflicts: # dist/showdown.js # dist/showdown.js.map # dist/showdown.min.js # dist/showdown.min.js.map
This commit is contained in:
commit
740f580f11
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.
|
@ -6,8 +6,8 @@ showdown.subParser('italicsAndBold', function (text, options, globals) {
|
||||||
if (options.literalMidWordUnderscores) {
|
if (options.literalMidWordUnderscores) {
|
||||||
//underscores
|
//underscores
|
||||||
// Since we are consuming a \s character, we need to add it
|
// Since we are consuming a \s character, we need to add it
|
||||||
text = text.replace(/(^|\s|>|\b)__(?=\S)([^]+?)__(?=\b|<|\s|$)/gm, '$1<strong>$2</strong>');
|
text = text.replace(/(^|\s|>|\b)__(?=\S)([\s\S]+?)__(?=\b|<|\s|$)/gm, '$1<strong>$2</strong>');
|
||||||
text = text.replace(/(^|\s|>|\b)_(?=\S)([^]+?)_(?=\b|<|\s|$)/gm, '$1<em>$2</em>');
|
text = text.replace(/(^|\s|>|\b)_(?=\S)([\s\S]+?)_(?=\b|<|\s|$)/gm, '$1<em>$2</em>');
|
||||||
//asterisks
|
//asterisks
|
||||||
text = text.replace(/(\*\*)(?=\S)([^\r]*?\S[*]*)\1/g, '<strong>$2</strong>');
|
text = text.replace(/(\*\*)(?=\S)([^\r]*?\S[*]*)\1/g, '<strong>$2</strong>');
|
||||||
text = text.replace(/(\*)(?=\S)([^\r]*?\S)\1/g, '<em>$2</em>');
|
text = text.replace(/(\*)(?=\S)([^\r]*?\S)\1/g, '<em>$2</em>');
|
||||||
|
|
|
@ -5,7 +5,7 @@ showdown.subParser('tables', function (text, options, globals) {
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
|
|
||||||
var tableRgx = /^[ \t]{0,3}\|?.+\|.+\n[ \t]{0,3}\|?[ \t]*:?[ \t]*(?:-|=){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:-|=){2,}[^]+?(?:\n\n|~0)/gm;
|
var tableRgx = /^[ \t]{0,3}\|?.+\|.+\n[ \t]{0,3}\|?[ \t]*:?[ \t]*(?:-|=){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:-|=){2,}[\s\S]+?(?:\n\n|~0)/gm;
|
||||||
|
|
||||||
function parseStyles(sLine) {
|
function parseStyles(sLine) {
|
||||||
if (/^:[ \t]*--*$/.test(sLine)) {
|
if (/^:[ \t]*--*$/.test(sLine)) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user