1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +00:00

Fix broken regexps

Using .|\n was a very bad idea, as it doesn't match other newline
characters
This commit is contained in:
Jeremy Ruston 2013-09-18 19:09:54 +01:00
parent b563d8e98a
commit 3d5d5952b7

View File

@ -36,8 +36,8 @@ var parseTiddlerDiv = function(text /* [,fields] */) {
}
}
// Parse the DIV body
var divRegExp = /^\s*<div\s+([^>]*)>((?:.|\n)*)<\/div>\s*$/gi,
subDivRegExp = /^\s*<pre>((?:.|\n)*)<\/pre>\s*$/gi,
var divRegExp = /^\s*<div\s+([^>]*)>((?:\s|\S)*)<\/div>\s*$/gi,
subDivRegExp = /^\s*<pre>((?:\s|\S)*)<\/pre>\s*$/gi,
attrRegExp = /\s*([^=\s]+)\s*=\s*"([^"]*)"/gi,
match = divRegExp.exec(text);
if(match) {