diff --git a/Makefile b/Makefile index d96f849b..1d3534fa 100644 --- a/Makefile +++ b/Makefile @@ -37,9 +37,9 @@ src/prettify.js: js-modules/*.js js-modules/*.pl || rm src/prettify.js @if [ -e $@ ]; then chmod -w $@; fi -distrib: distrib.tstamp distrib/google-code-prettify-minimized.tgz \ - distrib/google-code-prettify-minimized.tar.bz2 - @wc -c distrib/google-code-prettify-minimized.{tar.bz2,tgz} \ +distrib: distrib.tstamp distrib/prettify-small.tgz \ + distrib/prettify-small.tar.bz2 + @wc -c distrib/prettify-small.{tar.bz2,tgz} \ | grep -v total distrib.tstamp: src/*.js src/*.css @@ -85,7 +85,7 @@ distrib.tstamp: src/*.js src/*.css %.tar.bz2: %.tar @bzip2 -9f $^ -distrib/google-code-prettify-minimized.tar: distrib.tstamp +distrib/prettify-small.tar: distrib.tstamp @pushd distrib >& /dev/null; \ tar cf ../$@ google-code-prettify; \ popd >& /dev/null diff --git a/src/prettify.js b/src/prettify.js index 77a4b4bd..037c26da 100644 --- a/src/prettify.js +++ b/src/prettify.js @@ -289,7 +289,7 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& var inverse = charsetParts[0] === '^'; for (var i = inverse ? 1 : 0, n = charsetParts.length; i < n; ++i) { var p = charsetParts[i]; - if (/\\[bdsw]/i.test(p)) { + if (/\\[bdsw]/i.test(p)) { // Don't muck with named groups. groups.push(p); } else { var start = decodeEscape(p); @@ -302,6 +302,9 @@ var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|& } ranges.push([start, end]); // If the range might intersect letters, then expand it. + // This case handling is too simplistic. + // It does not deal with non-latin case folding. + // It works for latin source code identifiers though. if (!(end < 65 || start > 122)) { if (!(end < 65 || start > 90)) { ranges.push([Math.max(65, start) | 32, Math.min(end, 90) | 32]);