Skip to content

Backwards-incompatible strikethrough changes #400

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jez
Copy link
Contributor

@jez jez commented Jun 30, 2025

There are two orthogonal changes here.

  1. Recent versions of Vim/Neovim support strikethrough text. We can
    use that instead of underline for ~~foo~~ in Pandoc Markdown
    files.

  2. The is two unicode codepoints:

    • 0x78, which is ASCII x
    • 0x0336, which in UTF-8 is two bytes: 0xCC 0xB6. It "combining
      long stroke overlay" which is a diacritic, modifying the character
      immediately before it.

    Vim does not do a great job when cchar conceals are defined with
    complicated Unicode like this. Even though renders fine in my
    terminal 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 delete
    this and treat it like bold or italic regions. Given the
    strikethrough change above, it should be easy to completely
    conceal 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 that
    preference respected. Other users will see a change in the concealed
    preview (see screenshots).

Before (← conceallevel=0 / conceallevel=2 →)
Screenshot 2025-06-30 at 2 36 37 PM

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

There are two orthogonal changes here.

1.  Recent versions of Vim/Neovim support `strikethrough` text. We can
    use that instead of underline for `~~foo~~` in Pandoc Markdown
    files.

2.  The `x̶` is two unicode codepoints:

    - `0x78`, which is ASCII `x`
    - `0x0336`, which in UTF-8 is two bytes: `0xCC 0xB6`. It "combining
      long stroke overlay" which is a diacritic, modifying the character
      immediately before it.

    Vim does not do a great job when `cchar` conceals are defined with
    complicated Unicode like this. Even though `x̶` renders fine in my
    terminal 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 delete
    this and treat it like bold or italic regions. Given the
    `strikethrough` change above, it should be easy to completely
    conceal 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 that
    preference disabled. Other users will see a change in the concealled
    preview (see screenshots).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant