Skip to content

Commit

Permalink
Update parse API
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Aug 17, 2015
1 parent 29926ca commit e196576
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@ Main example of parse is Safe Parser, to parse broken CSS. There is not sense
to generate string with broken CSS, so package should provide only parser.

Parser API is a function, that receives string and returns `Root` node.
The second function argument will be a object with PostCSS options.

```js
var postcss = require('postcss');

module.exports = function (css) {
module.exports = function (css, opts) {
var root = postcss.root();
// Some magic with css
return root;
Expand Down

0 comments on commit e196576

Please sign in to comment.