Skip to content

Commit

Permalink
Merge pull request #271 from butchmarshall/master
Browse files Browse the repository at this point in the history
fix(IE8): Fix IE8 regex compatability
  • Loading branch information
tivie committed Jun 27, 2016
2 parents b9c881d + cc4cdf7 commit be2ffc1
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 50 deletions.
84 changes: 42 additions & 42 deletions dist/showdown.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/showdown.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/showdown.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/showdown.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/subParsers/italicsAndBold.js
Expand Up @@ -6,8 +6,8 @@ showdown.subParser('italicsAndBold', function (text, options, globals) {
if (options.literalMidWordUnderscores) {
//underscores
// 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)([^]+?)_(?=\b|<|\s|$)/gm, '$1<em>$2</em>');
text = text.replace(/(^|\s|>|\b)__(?=\S)([\s\S]+?)__(?=\b|<|\s|$)/gm, '$1<strong>$2</strong>');
text = text.replace(/(^|\s|>|\b)_(?=\S)([\s\S]+?)_(?=\b|<|\s|$)/gm, '$1<em>$2</em>');
//asterisks
text = text.replace(/(\*\*)(?=\S)([^\r]*?\S[*]*)\1/g, '<strong>$2</strong>');
text = text.replace(/(\*)(?=\S)([^\r]*?\S)\1/g, '<em>$2</em>');
Expand Down
2 changes: 1 addition & 1 deletion src/subParsers/tables.js
Expand Up @@ -5,7 +5,7 @@ showdown.subParser('tables', function (text, options, globals) {
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) {
if (/^:[ \t]*--*$/.test(sLine)) {
Expand Down

1 comment on commit be2ffc1

@tivie
Copy link
Member Author

@tivie tivie commented on be2ffc1 Jun 27, 2016

Choose a reason for hiding this comment

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

Closes #271, #270

Please sign in to comment.