Module markdown_it::common::utils
source · [−]Expand description
Random assortment of functions that’s used internally to write plugins.
Functions
Calculate trailing whitespace with total length of indent.
Returns trailing whitespace with total length of indent.
Escape " < > & with corresponding HTML entities;
Calculate number of spaces from pos to first non-space character or EOL.
Check if “&xxxx;” string is a valid HTML entity, return character it represents.
Return true if a code you got from &#xHHHH; entity is a valid charcode.
Unicode case folding + space normalization, used for for reference labels.
Count number of characters since last occurrence of char.
Unescape both entities (" -> ") and backslash escapes (\" -> ").