Skip to content

Commit

Permalink
Updated docs to clarify whitespace removal for nested text
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-steele-idem committed Aug 3, 2016
1 parent 5a96b1d commit 0521933
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/language-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,8 @@ __Option 2)__ Disable whitespace removal using the `marko-preserve-whitespace` a
</div>
```

NOTE: When whitespace preservation is enabled, whitespace will be preserved for text at any level below the tag that the `marko-preserve-whitespace` attribute is attached to.

__Option 3)__ Disable _all_ whitespace removal by changing a compiler option

```javascript
Expand All @@ -800,6 +802,8 @@ Adding the `"preserve-whitespace": true` property to a tag definition will resul
}
```

NOTE: When whitespace preservation is enabled, whitespace will be preserved for text at any level below the tag.

# Helpers

Since Marko template files compile into CommonJS modules, any Node.js module can be "imported" into a template for use as a helper module. For example, given the following helper module:
Expand Down

0 comments on commit 0521933

Please sign in to comment.