Skip to content
Permalink
Browse files

Clearify Node#raws rules

  • Loading branch information
ai committed Nov 20, 2019
1 parent e0def60 commit 358a553dc5edeb5a69b6131f87e097628daf9807
Showing with 2 additions and 0 deletions.
  1. +2 −0 docs/syntax.md
@@ -213,6 +213,8 @@ output if there were no changes.

This is why every node has `node.raws` object to store space symbol, etc.

All data related to source code and not CSS structure, should be in `Node#raws`. For instance, `postcss-scss` keep in `Comment#raws.inline` boolean marker of inline comment (`// comment` instead of `/* comment */`).

Be careful, because sometimes these raw properties will not be present; some
nodes may be built manually, or may lose their indentation when they are moved
to another parent node.

0 comments on commit 358a553

Please sign in to comment.
You can’t perform that action at this time.