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

Bug Report: The markdown strikethrough is not working #1958

Open
Arpita-Jaiswal opened this issue Oct 9, 2024 · 1 comment
Open

Bug Report: The markdown strikethrough is not working #1958

Arpita-Jaiswal opened this issue Oct 9, 2024 · 1 comment

Comments

@Arpita-Jaiswal
Copy link
Contributor

The ~~text~~ syntax in fastn should apply the text-decoration: line-through CSS to the text.

However, it is not working as expected because the global CSS rule:

*, :after, :before {
    text-decoration: none;
    ...
}

is overriding the specific rule for the <del> element:

del {
    text-decoration: line-through;
}

Steps to Reproduce:

  1. Use the following FTD syntax:
    -- ftd.text: This ~~sentence is grammatically wrong~~, correct it.
    
  2. Observe that the text is not struck through.

Expected Behavior:

Text wrapped in the ~~ markdown syntax should be displayed with a line-through effect.

Example:

-- ftd.text: This ~~sentence is grammatically wrong~~, correct it.

Expected output:

This sentence is grammatically wrong, correct it.

Suggested Fix:

To ensure that the del element's text-decoration: line-through is applied, we need to add !important to the rule:

del {
    text-decoration: line-through !important;
}

Environment:

  • Browser:
    • Chrome Version 126.0.6478.183,
    • Safari Version 17.5 (19618.2.12.11.6)
  • Device: Apple M2 Pro

Reported by Sneha Upadhyay on discord.

@Arpita-Jaiswal
Copy link
Contributor Author

PR: #1959

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant