mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-14 20:04:44 -04:00
Add a chomp function.
- Mostly useful in pipelines.
This commit is contained in:
parent
c3e212b9f6
commit
f05fa024f7
@ -252,6 +252,11 @@ Convert all characters in string to titlecase.
|
|||||||
|
|
||||||
e.g. `{{title "BatMan"}}` → "Batman"
|
e.g. `{{title "BatMan"}}` → "Batman"
|
||||||
|
|
||||||
|
### chomp
|
||||||
|
Removes any trailing newline characters. Useful in a pipeline to remove newlines added by other processing (including `markdownify`).
|
||||||
|
|
||||||
|
e.g., `{{chomp "<p>Blockhead</p>\n"` → `"<p>Blockhead</p>"`
|
||||||
|
|
||||||
### highlight
|
### highlight
|
||||||
Take a string of code and a language, uses Pygments to return the syntax
|
Take a string of code and a language, uses Pygments to return the syntax
|
||||||
highlighted code in HTML. Used in the [highlight
|
highlighted code in HTML. Used in the [highlight
|
||||||
|
Loading…
x
Reference in New Issue
Block a user