NAME
App::Greple::md::widen - give some characters a column of their own
SYNOPSIS
greple -Mmd --begin '&widen' -- file.md
greple -Mmd --begin '&widen(chars=2460-24FF:3248-324F)' -- file.md
mdee -t widen file.md
DESCRIPTION
Circled digits and the wastebasket (U+1F5D1) are one column wide to Unicode and to the terminals, but macOS terminals draw them over two columns, on top of the next character. The function widen, for the --begin option of App::Greple::md, adds a no-break space after such a character, so that its width is right for every tool. A no-break space is used because it stays at the end of a folded line, where ansifold removes spaces. A variation selector (U+FE0E or U+FE0F) after the character stays with it, and the space comes after the selector.
Fenced code with a language, code spans, the addresses of links and autolinks are left as they are, because a program must stay as it is written. Fenced code without a language is often a figure or an output, and is changed. Copying the text from the screen brings the no-break spaces along.
PARAMETERS
- chars
-
The characters as code points and ranges in hexadecimal, separated by colons. Default is
2460-24FF:1F5D1, the circled digits and the wastebasket.
SEE ALSO
LICENSE
This software is released under the MIT License. https://opensource.org/licenses/MIT