[Pkg-mozext-commits] [SCM] perspectives-extension branch, debian, updated. 4.2-4-136-gd6962eb
Dave Schaefer
dave.schaefer at gmail.com
Thu Jun 28 22:04:59 UTC 2012
The following commit has been merged in the debian branch:
commit b0d2cfb033e151cac36edb29c4a0617162b11401
Author: Dave Schaefer <dave.schaefer at gmail.com>
Date: Mon Jun 11 23:14:39 2012 -0700
Unit Tests - Fix dtd comment regex so they can be multiline
diff --git a/test/test.html b/test/test.html
index 0ef39c6..1efeb11 100644
--- a/test/test.html
+++ b/test/test.html
@@ -153,13 +153,18 @@ function get_loc_keys(filelist, locdirname) {
// DTD entities look like:
// <!ENTITY Name "String">
- // Assumptions: could be one line or many. Cannot contain chars:
+ // Assumptions:
+ // - Could be one line or many
+ // (so we use [\s\S]*? instead of .* to match across multiple lines
+ // (make sure to make that *NON*-greedy!))
+ // - Cannot contain chars:
// "%<>
+ //
// For dtds to load inside xhtml files (such as our help.xhtml)
// it is very important that they have the closing >
// note: “” (smart quotes) both seem to load fine in xhtml,
// since we use " to wrap our strings.
- var dtdcomment = /<!--.*-->/g;
+ var dtdcomment = /<!--[\s\S]*?-->/g;
var dtdsep = /<!ENTITY/;
var dtdline = / +([A-Za-z0-9]+) +"([^"%<>]*)" *>/;
@@ -283,7 +288,7 @@ function get_keys_from_stream(datastream, comment, delimiter, itemregex, keys, s
var justspace = space.exec(lines[i]);
if (!justspace) {
assert(false, "(" + locdirname + "): Malformed entry '" + lines[i] + "' in " + sourcefilename
- + ". You can try running 'make' or the perl script to fix this.");
+ + " (line " + (i+1) + "). You can try running 'make' or the perl script to fix this.");
}
}
}
--
perspectives-extension
More information about the Pkg-mozext-commits
mailing list