Backwards-incompatible strikethrough changes #400
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are two orthogonal changes here.
Recent versions of Vim/Neovim support
strikethrough
text. We canuse that instead of underline for
~~foo~~
in Pandoc Markdownfiles.
The
x̶
is two unicode codepoints:0x78
, which is ASCIIx
0x0336
, which in UTF-8 is two bytes:0xCC 0xB6
. It "combininglong stroke overlay" which is a diacritic, modifying the character
immediately before it.
Vim does not do a great job when
cchar
conceals are defined withcomplicated Unicode like this. Even though
x̶
renders fine in myterminal in Vim, when it's used as a conceal character, only the
first byte was getting rendered.
Rather than fix that, and write
x
directly, I've chosen to deletethis and treat it like bold or italic regions. Given the
strikethrough
change above, it should be easy to completelyconceal the strikethrough markers, like is done for bold italic,
because the strikethrough will disambiguate.
Users who have already added
strikeout
in the conceal blacklist(see
g:pandoc#syntax#conceal#blacklist
) will continue to have thatpreference respected. Other users will see a change in the concealed
preview (see screenshots).
Before (←

conceallevel=0
/conceallevel=2
→)After (←

conceallevel=0
/conceallevel=2
→)