catharsis
Advanced tools
Comparing version 0.5.0 to 0.5.1
/** | ||
* catharsis 0.4.2 | ||
* Catharsis | ||
* A parser for Google Closure Compiler type expressions, powered by PEG.js. | ||
@@ -104,2 +104,6 @@ * | ||
typeExpr = typeExpr.replace(/[\r\n]/g, '') | ||
.replace(/\s+/g, ' ') | ||
.trim(); | ||
return cachedParse(typeExpr, options); | ||
@@ -106,0 +110,0 @@ }; |
{ | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"name": "catharsis", | ||
@@ -4,0 +4,0 @@ "description": "A JavaScript parser for Google Closure Compiler and JSDoc type expressions.", |
@@ -105,5 +105,5 @@ # Catharsis # | ||
name expression matches a key in `options.links`, the name expression will be wrapped in an | ||
HTML <a> tag that links to the URI. If `options.cssClass` is specified, the <a> tag will include | ||
a `class` attribute. **Note**: When using this option, parsed types are always restringified, | ||
and the resulting string is not cached. | ||
HTML `<a>` tag that links to the URI. If `options.cssClass` is specified, the `<a>` tag will | ||
include a `class` attribute. **Note**: When using this option, parsed types are always | ||
restringified, and the resulting string is not cached. | ||
+ `options.restringify`: Forces Catharsis to restringify the parsed type. If this option is not | ||
@@ -147,2 +147,4 @@ specified, and the parsed type object includes a `typeExpression` property, Catharsis will | ||
+ 0.5.1 (March 2013): Newlines and extra spaces are now removed from type expressions before they | ||
are parsed. | ||
+ 0.5.0 (March 2013): | ||
@@ -149,0 +151,0 @@ + The `parse()` method's `lenient` option has been renamed to `jsdoc`. **Note**: This change is |
@@ -82,2 +82,7 @@ /*global describe: true, it: true, xit: true */ | ||
}); | ||
it('should strip newlines before parsing a type expression', function() { | ||
var parsed = catharsis.parse('My\rNew\nClass\r\n'); | ||
parsed.name.should.equal('MyNewClass'); | ||
}); | ||
}); | ||
@@ -84,0 +89,0 @@ |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
272508
2648
211
0