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

[email protected]

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/[email protected] /Users/nicolas/nmattia.com
├── @astrojs/[email protected]
├── @astrojs/[email protected]
├── @astrojs/[email protected]
├── @astrojs/[email protected]
├── @types/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

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