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
posto first non-space character or EOL. - Check if “&xxxx;” string is a valid HTML entity, return character it represents.
- Checks whether a given character should count as punctuation
- Return true if a
codeyou 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 (\" -> ").