Skip to content

Commit

Permalink
Update links
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasbynens committed Aug 31, 2014
1 parent 81832e0 commit 39febe5
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# regexpu [![Build status](https://travis-ci.org/mathiasbynens/regexpu.svg?branch=master)](https://travis-ci.org/mathiasbynens/regexpu) [![Code coverage status](http://img.shields.io/coveralls/mathiasbynens/regexpu/master.svg)](https://coveralls.io/r/mathiasbynens/regexpu) [![Dependency status](https://gemnasium.com/mathiasbynens/regexpu.svg)](https://gemnasium.com/mathiasbynens/regexpu)

_regexpu_ is a source code transpiler that enables the use of ES6 Unicode regular expressions in JavaScript-of-today (ES5). It rewrites regular expressions that make use of [the ES6 `u` flag](https://mathiasbynens.be/notes/es6-unicode-regex) into equivalent ES5-compatible regular expressions. [Here’s an online demo.](http://mothereff.in/regexpu)
_regexpu_ is a source code transpiler that enables the use of ES6 Unicode regular expressions in JavaScript-of-today (ES5). It rewrites regular expressions that make use of [the ES6 `u` flag](https://mathiasbynens.be/notes/es6-unicode-regex) into equivalent ES5-compatible regular expressions. [Here’s an online demo.](https://mothereff.in/regexpu)

## Example

Expand Down Expand Up @@ -55,7 +55,7 @@ console.log([
## Known limitations

1. _regexpu_ only transpiles regular expression _literals_, so things like `RegExp('…', 'u')` are not affected.
2. It doesn’t polyfill [the `RegExp.prototype.unicode` getter](http://mths.be/es6#sec-get-regexp.prototype.unicode) because it’s not possible to do so without side effects.
2. It doesn’t polyfill [the `RegExp.prototype.unicode` getter](https://mths.be/es6#sec-get-regexp.prototype.unicode) because it’s not possible to do so without side effects.

## Installation

Expand Down Expand Up @@ -152,4 +152,4 @@ console.log(result.map); // source map

## License

_regexpu_ is available under the [MIT](http://mths.be/mit) license.
_regexpu_ is available under the [MIT](https://mths.be/mit) license.
2 changes: 1 addition & 1 deletion bin/regexpu
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

if (/^(?:-h|--help|undefined)$/.test(option)) {
log(
'regexpu v%s - http://mths.be/regexpu',
'regexpu v%s - https://mths.be/regexpu',
regexpu.version
);
log([
Expand Down
2 changes: 1 addition & 1 deletion man/regexpu.1
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ regexpu's bug tracker is located at <https://github.com/mathiasbynens/regexpu/is
.Sh AUTHOR
Mathias Bynens <https://mathiasbynens.be/>
.Sh WWW
<http://mths.be/regexpu>
<https://mths.be/regexpu>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "regexpu",
"version": "0.1.1",
"description": "A source code transpiler that enables the use of ES6 Unicode regular expressions in ES5.",
"homepage": "http://mths.be/regexpu",
"homepage": "https://mths.be/regexpu",
"main": "regexpu.js",
"bin": "bin/regexpu",
"keywords": [
Expand Down
8 changes: 4 additions & 4 deletions scripts/character-class-escape-sets.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function caseFold(codePoint) {
// character classes (if any).
var UNICODE_SET = regenerate().addRange(0x0, 0x10FFFF);
// Without the `u` flag, the range stops at 0xFFFF.
// http://mths.be/es6#sec-pattern-semantics
// https://mths.be/es6#sec-pattern-semantics
var BMP_SET = regenerate().addRange(0x0, 0xFFFF);

var ESCAPE_CHARS = {};
Expand Down Expand Up @@ -57,23 +57,23 @@ function addCharacterClassEscape(lower, set) {
}

// Prepare a Regenerate set for every existing character class escape.
// http://mths.be/es6#sec-characterclassescape
// https://mths.be/es6#sec-characterclassescape
addCharacterClassEscape(
'd', // `\d` and `\D`
regenerate().addRange('0', '9')
);
addCharacterClassEscape(
's', // `\s` and `\S`
regenerate(
// http://mths.be/es6#sec-white-space
// https://mths.be/es6#sec-white-space
0x0009,
0x000B,
0x000C,
0x0020,
0x00A0,
0xFEFF,
Zs,
// http://mths.be/es6#sec-line-terminators
// https://mths.be/es6#sec-line-terminators
0x000A,
0x000D,
0x2028,
Expand Down
4 changes: 2 additions & 2 deletions scripts/iu-mappings.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ writeJSON('data/simple-case-folding-mappings.json', oneWayMappings);
// (U+017F) to `s`. Such characters are not mapped if Unicode is `false`.
// This prevents Unicode code points such as U+017F and U+212A from matching
// regular expressions such as `/[a‑z]/i`, but they will match `/[a‑z]/ui`.
// http://mths.be/es6#sec-runtime-semantics-canonicalize-abstract-operation
// https://mths.be/es6#sec-runtime-semantics-canonicalize-abstract-operation
// Get the mappings that are unique to regular expressions that have both the
// `i` and `u` flags set. In addition to the above, this includes all mappings
// for astral code points.
Expand Down Expand Up @@ -131,7 +131,7 @@ _.forEach(oneWayMappings, function(to, from) {
// Include astral code points.
(from > 0xFFFF || to > 0xFFFF) ||
// Exclude ES5 mappings as per the above comment.
// http://mths.be/es6#sec-runtime-semantics-canonicalize-abstract-operation
// https://mths.be/es6#sec-runtime-semantics-canonicalize-abstract-operation
(from >= 0x80 && to < 0x80)
) {
extend(filteredMappings, from, to);
Expand Down
6 changes: 3 additions & 3 deletions src/rewrite-pattern.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ function has(object, property) {
// character classes (if any).
var UNICODE_SET = regenerate().addRange(0x0, 0x10FFFF);
// Without the `u` flag, the range stops at 0xFFFF.
// http://mths.be/es6#sec-pattern-semantics
// https://mths.be/es6#sec-pattern-semantics
var BMP_SET = regenerate().addRange(0x0, 0xFFFF);

// Prepare a Regenerate set containing all code points that are supposed to be
// matched by `/./u`. http://mths.be/es6#sec-atom
// matched by `/./u`. https://mths.be/es6#sec-atom
var DOT_SET_UNICODE = UNICODE_SET.clone() // all Unicode code points
.remove(
// minus `LineTerminator`s (http://mths.be/es6#sec-line-terminators):
// minus `LineTerminator`s (https://mths.be/es6#sec-line-terminators):
0x000A, // Line Feed <LF>
0x000D, // Carriage Return <CR>
0x2028, // Line Separator <LS>
Expand Down

0 comments on commit 39febe5

Please sign in to comment.