plusparse/entities library
HTML entity and numeric character references (&, ©,
😀), decoded the CommonMark way.
Numeric references and the whole HTML5 table of named ones. A name that is not an entity stays literal text, as CommonMark has it.
Functions
-
decodeEntities(
String text) → String -
textwith every reference in it decoded. Used for link destinations and titles, where CommonMark decodes references too. -
entityAt(
String text, int i) → ({int next, String value})? -
The reference starting at the
&ati, decoded, and the index just past its;— or null when the text there is not a reference.