Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Formatting for section comments.

  • Loading branch information...
commit 4a68942d7d498ef502c70e66c220821df16541f3 1 parent 393af51
@slevithan authored
Showing with 50 additions and 50 deletions.
  1. +7 −7 src/addons/unicode/unicode-base.js
  2. +18 −18 src/xregexp.js
  3. +25 −25 xregexp-all.js
View
14 src/addons/unicode/unicode-base.js
@@ -8,9 +8,9 @@
/**
* Adds support for the `\p{L}` or `\p{Letter}` Unicode category. Addon packages for other Unicode
- * categories, scripts, blocks, and properties are available separately. All Unicode tokens can be
- * inverted using `\P{..}` or `\p{^..}`. Token names are case insensitive, and any spaces, hyphens,
- * and underscores are ignored.
+ * categories, scripts, blocks, and properties are available separately. Also adds flag A (astral),
+ * which enables 21-bit Unicode support. All Unicode tokens can be inverted using `\P{..}` or
+ * `\p{^..}`. Token names ignore case, spaces, hyphens, and underscores.
* @requires XRegExp
*/
(function(XRegExp) {
@@ -19,9 +19,9 @@
// Storage for Unicode data
var unicode = {};
-/*--------------------------------------
+/* ==============================
* Private functions
- *------------------------------------*/
+ * ============================== */
// Generates a token lookup name: lowercase, with hyphens, spaces, and underscores removed
function normalize(name) {
@@ -113,9 +113,9 @@
);
}
-/*--------------------------------------
+/* ==============================
* Core functionality
- *------------------------------------*/
+ * ============================== */
/* Add Unicode token syntax: \p{..}, \P{..}, \p{^..}. Also add astral mode (flag A).
*/
View
36 src/xregexp.js
@@ -13,9 +13,9 @@
var XRegExp = (function(undefined) {
'use strict';
-/*--------------------------------------
+/* ==============================
* Private variables
- *------------------------------------*/
+ * ============================== */
var // ...
@@ -87,9 +87,9 @@ var XRegExp = (function(undefined) {
// Shortcut to `XRegExp.addToken`
add;
-/*--------------------------------------
+/* ==============================
* Private functions
- *------------------------------------*/
+ * ============================== */
/**
* Attaches named capture data and `XRegExp.prototype` properties to a regex object.
@@ -358,9 +358,9 @@ var XRegExp = (function(undefined) {
return value;
}
-/*--------------------------------------
+/* ==============================
* Constructor
- *------------------------------------*/
+ * ============================== */
/**
* Creates an extended regular expression object for matching text with a pattern. Differs from a
@@ -507,9 +507,9 @@ var XRegExp = (function(undefined) {
// changed to `XRegExp.prototype` via `__proto__`
self.prototype = new RegExp;
-/*--------------------------------------
+/* ==============================
* Public properties
- *------------------------------------*/
+ * ============================== */
/**
* The XRegExp version number.
@@ -519,9 +519,9 @@ var XRegExp = (function(undefined) {
*/
self.version = '3.0.0-pre';
-/*--------------------------------------
+/* ==============================
* Public methods
- *------------------------------------*/
+ * ============================== */
/**
* Extends XRegExp syntax and allows custom flags. This is used internally and can be used to
@@ -1194,9 +1194,9 @@ var XRegExp = (function(undefined) {
return self(output.join('|'), flags);
};
-/*--------------------------------------
- * Fixed and extended native methods
- *------------------------------------*/
+/* ==============================
+ * Fixed/extended native methods
+ * ============================== */
/**
* Adds named capture support (with backreferences returned as `result.name`), and fixes browser
@@ -1488,9 +1488,9 @@ var XRegExp = (function(undefined) {
return output.length > limit ? output.slice(0, limit) : output;
};
-/*--------------------------------------
- * Built-in syntax and flag tokens
- *------------------------------------*/
+/* ==============================
+ * Built-in syntax/flag tokens
+ * ============================== */
add = self.addToken;
@@ -1641,9 +1641,9 @@ var XRegExp = (function(undefined) {
{optionalFlags: 'n'}
);
-/*--------------------------------------
+/* ==============================
* Expose XRegExp
- *------------------------------------*/
+ * ============================== */
return self;
View
50 xregexp-all.js
@@ -40,9 +40,9 @@
var XRegExp = (function(undefined) {
'use strict';
-/*--------------------------------------
+/* ==============================
* Private variables
- *------------------------------------*/
+ * ============================== */
var // ...
@@ -114,9 +114,9 @@ var XRegExp = (function(undefined) {
// Shortcut to `XRegExp.addToken`
add;
-/*--------------------------------------
+/* ==============================
* Private functions
- *------------------------------------*/
+ * ============================== */
/**
* Attaches named capture data and `XRegExp.prototype` properties to a regex object.
@@ -385,9 +385,9 @@ var XRegExp = (function(undefined) {
return value;
}
-/*--------------------------------------
+/* ==============================
* Constructor
- *------------------------------------*/
+ * ============================== */
/**
* Creates an extended regular expression object for matching text with a pattern. Differs from a
@@ -534,9 +534,9 @@ var XRegExp = (function(undefined) {
// changed to `XRegExp.prototype` via `__proto__`
self.prototype = new RegExp;
-/*--------------------------------------
+/* ==============================
* Public properties
- *------------------------------------*/
+ * ============================== */
/**
* The XRegExp version number.
@@ -546,9 +546,9 @@ var XRegExp = (function(undefined) {
*/
self.version = '3.0.0-pre';
-/*--------------------------------------
+/* ==============================
* Public methods
- *------------------------------------*/
+ * ============================== */
/**
* Extends XRegExp syntax and allows custom flags. This is used internally and can be used to
@@ -1221,9 +1221,9 @@ var XRegExp = (function(undefined) {
return self(output.join('|'), flags);
};
-/*--------------------------------------
- * Fixed and extended native methods
- *------------------------------------*/
+/* ==============================
+ * Fixed/extended native methods
+ * ============================== */
/**
* Adds named capture support (with backreferences returned as `result.name`), and fixes browser
@@ -1515,9 +1515,9 @@ var XRegExp = (function(undefined) {
return output.length > limit ? output.slice(0, limit) : output;
};
-/*--------------------------------------
- * Built-in syntax and flag tokens
- *------------------------------------*/
+/* ==============================
+ * Built-in syntax/flag tokens
+ * ============================== */
add = self.addToken;
@@ -1668,9 +1668,9 @@ var XRegExp = (function(undefined) {
{optionalFlags: 'n'}
);
-/*--------------------------------------
+/* ==============================
* Expose XRegExp
- *------------------------------------*/
+ * ============================== */
return self;
@@ -2158,9 +2158,9 @@ var XRegExp = (function(undefined) {
/**
* Adds support for the `\p{L}` or `\p{Letter}` Unicode category. Addon packages for other Unicode
- * categories, scripts, blocks, and properties are available separately. All Unicode tokens can be
- * inverted using `\P{..}` or `\p{^..}`. Token names are case insensitive, and any spaces, hyphens,
- * and underscores are ignored.
+ * categories, scripts, blocks, and properties are available separately. Also adds flag A (astral),
+ * which enables 21-bit Unicode support. All Unicode tokens can be inverted using `\P{..}` or
+ * `\p{^..}`. Token names ignore case, spaces, hyphens, and underscores.
* @requires XRegExp
*/
(function(XRegExp) {
@@ -2169,9 +2169,9 @@ var XRegExp = (function(undefined) {
// Storage for Unicode data
var unicode = {};
-/*--------------------------------------
+/* ==============================
* Private functions
- *------------------------------------*/
+ * ============================== */
// Generates a token lookup name: lowercase, with hyphens, spaces, and underscores removed
function normalize(name) {
@@ -2263,9 +2263,9 @@ var XRegExp = (function(undefined) {
);
}
-/*--------------------------------------
+/* ==============================
* Core functionality
- *------------------------------------*/
+ * ============================== */
/* Add Unicode token syntax: \p{..}, \P{..}, \p{^..}. Also add astral mode (flag A).
*/
Please sign in to comment.
Something went wrong with that request. Please try again.