Skip to content
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

Strikethroughs are not rendered #71

Closed
4 tasks done
nmattia opened this issue Dec 7, 2024 · 3 comments
Closed
4 tasks done

Strikethroughs are not rendered #71

nmattia opened this issue Dec 7, 2024 · 3 comments
Labels
👀 no/external This makes more sense somewhere else 👎 phase/no Post cannot or will not be acted on

Comments

@nmattia
Copy link

nmattia commented Dec 7, 2024

Initial checklist

Affected package

remark-gfm@4.0.0

Steps to reproduce

I've adapted the function from the README to parse markdown with strikethrough (both single & double tildes):

async function test() {

  const file = await unified()
    .use(remarkParse)
    .use(remarkGfm)
    .use(remarkRehype)
    .use(rehypeStringify)
    .process(`
## Strikethrough

~one~ or ~~two~~ tildes.
            `);

  console.log(String(file))
}

test();

Running the program does not render <del> elements:

<h2>Strikethrough</h2>
<p>~one~ or ~~two~~ tildes.</p>

Happening inside an astro project, though doubt that has an impact:

$ npm list
@nmattia/nmattia.com@0.0.1 /Users/nicolas/nmattia.com
├── @astrojs/check@0.9.4
├── @astrojs/markdown-remark@6.0.0
├── @astrojs/rss@4.0.10
├── @astrojs/sitemap@3.2.1
├── @types/hast@3.0.4
├── astro@5.0.3
├── hast-util-classnames@3.0.0
├── hast-util-is-element@3.0.0
├── prettier-plugin-astro@0.14.1
├── prettier@3.3.3
├── rehype-document@7.0.3
├── rehype-format@5.0.1
├── rehype-katex@6.0.3
├── rehype-raw@7.0.0
├── remark-gfm@4.0.0
├── remark-math@6.0.0
├── the-new-css-reset@1.8.4
├── typescript@5.5.4
└── unist-util-visit@5.0.0

Actual behavior

The output does not include <del> elements:

<h2>Strikethrough</h2>
<p>~one~ or ~~two~~ tildes.</p>

Expected behavior

By default both single and double tildes should be rendered as del elements:

<h2>Strikethrough</h2>
<p><del>one</del> or <del>two</del> tildes.</p>

Runtime

No response

Package manager

No response

Operating system

No response

Build and bundle tools

No response

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Dec 7, 2024
@wooorm
Copy link
Member

wooorm commented Dec 9, 2024

Hi Nicolas! Tests work here. So I assume that this is an Astro problem. Or you have out of date dependencies.

@wooorm wooorm closed this as completed Dec 9, 2024
@wooorm wooorm added the 👀 no/external This makes more sense somewhere else label Dec 9, 2024

This comment has been minimized.

@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels Dec 9, 2024
@nmattia
Copy link
Author

nmattia commented Dec 9, 2024

@wooorm thanks! I'll dig a bit deeper then and report back

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👀 no/external This makes more sense somewhere else 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

2 participants