mirror of
https://github.com/showdownjs/showdown.git
synced 2024-03-22 13:30:55 +08:00
fix(paragraph): workaround QML bug
QML has a bug that changes the behavior or String.search(). This prevents blocks from being correctly unhashified. This commit works around that bug, using RegExp.test instead of String.search. Credits to @qyvlik Closes #246, Closes #338
This commit is contained in:
parent
a029ab3127
commit
f7a429e8db
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.
|
@ -36,7 +36,8 @@ showdown.subParser('paragraphs', function (text, options, globals) {
|
|||
grafsOutIt = grafsOut[i],
|
||||
codeFlag = false;
|
||||
// if this is a marker for an html block...
|
||||
while (grafsOutIt.search(/¨(K|G)(\d+)\1/) >= 0) {
|
||||
// use RegExp.test instead of string.search because of QML bug
|
||||
while (/¨(K|G)(\d+)\1/.test(grafsOutIt)) {
|
||||
var delim = RegExp.$1,
|
||||
num = RegExp.$2;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user