Comparing version 2.0.0 to 2.0.1
@@ -0,1 +1,6 @@ | ||
2.0.1 / 2016-05-31 | ||
================== | ||
* Update README for `filename` option | ||
2.0.0 / 2016-05-14 | ||
@@ -2,0 +7,0 @@ ================== |
{ | ||
"name": "pug-lexer", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "The pug lexer (takes a string and converts it to an array of tokens)", | ||
@@ -28,2 +28,2 @@ "keywords": [ | ||
"license": "MIT" | ||
} | ||
} |
@@ -19,14 +19,14 @@ # pug-lexer | ||
### `lex(str, filename, options)` | ||
### `lex(str, options)` | ||
Convert Pug string to an array of tokens. | ||
`filename`, if provided, is used in error handling. | ||
`options` can contain the following property: | ||
- `filename` (string): The name of the Pug file; it is used in error handling if provided. | ||
- `plugins` (array): An array of plugins, in the order they should be applied. | ||
```js | ||
console.log(JSON.stringify(lex('div(data-foo="bar")', 'my-file.pug'), null, ' ')) | ||
console.log(JSON.stringify(lex('div(data-foo="bar")', {filename: 'my-file.pug'}), null, ' ')) | ||
``` | ||
@@ -60,3 +60,3 @@ | ||
### `new lex.Lexer(str, filename, options)` | ||
### `new lex.Lexer(str, options)` | ||
@@ -67,2 +67,3 @@ Constructor for a Lexer class. This is not meant to be used directly unless you know what you are doing. | ||
- `filename` (string): The name of the Pug file; it is used in error handling if provided. | ||
- `interpolated` (boolean): if the Lexer is created as a child lexer for inline tag interpolation (e.g. `#[p Hello]`). Defaults to `false`. | ||
@@ -69,0 +70,0 @@ - `startingLine` (integer): the real line number of the first line in the input. It is also used for inline tag interpolation. Defaults to `1`. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
219450
73