!truncate

Shortens the text in its body to at most length characters, ending it with an ellipsis.

!truncateMicronode

#Attributes

lengthRequiredImplicit
The most characters the result may have, the ellipsis included. A whole number, 1 or more.
Can be written as shorthand: !truncate:value
ellipsis
What marks the cut. It counts towards length, so the result is never longer than asked.
Default…

#Allowed content

Body { }Inline Chalk content, flattened to plain text

#Examples

table{
    Site | Notes
    BAL-04 | !truncate:24{Dense cover on the north slope, sampled twice}
}

#Notes

  • !truncate:8{internationalisation} gives interna….
  • Text already within the length is unchanged.
  • A length with no room for the ellipsis drops it: !truncate:1{abc} gives a.
  • The body is read as plain text, so markup in it is dropped. A {{…}} expression in it is read at its current value.

Last updated