Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Jun 1, 2011
1 parent 4aceceb commit f1d86b2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
5 changes: 4 additions & 1 deletion src/prettify.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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]);
Expand Down

0 comments on commit f1d86b2

Please sign in to comment.