edit

Caret

Overview

Caret optionally adds two different features which are syntactically built around the ^ character: insert which inserts <ins></ins> tags and superscript which inserts <sup></sup> tags. Syntax behavior for smart and non-smart variants of insert models that of BetterEm.

Options

Option Type Default Description
smart_insert bool True Use smart logic with insert characters: ^^underline^^me^^underline^^me.
insert bool True Enable insert feature.
superscript bool True Enable superscript feature.

Examples

The first feature adds underline emphasis (ins tags) when inline text is surrounded by double carets: ^^underline me^^underline me. It can optionally be configured to use smart logic: ^^underline^^me^^underline^^me.

The second feature adds superscript using single carets: H^2^0 → H20. It uses Pandoc style logic, so if your superscript needs to have spaces, you must escape the spaces: text^a\ superscript^ → texta superscript.