mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Updated docs to clarify whitespace removal for nested text
This commit is contained in:
parent
5a96b1d5d9
commit
0521933c99
@ -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
|
||||
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user