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

ALL text formatting broken after any HTML in narratives #1212

Open
sidneymbell opened this issue Sep 22, 2020 · 1 comment
Open

ALL text formatting broken after any HTML in narratives #1212

sidneymbell opened this issue Sep 22, 2020 · 1 comment
Assignees
Labels
bug Something isn't working narratives issues / PRs relating to narrative functionality office-hours Issue mentioned during office hours regression used to work but now doesn't

Comments

@sidneymbell
Copy link
Contributor

Expected:
<p>some **bold** text</p> --> some bold text

Observed:

  • <p>some **bold** text</p> --> some **bold** text
  • </p> some **bold** text --> some **bold** text
  • </p> some <b>bold</b> text --> some text (missing!?!?)

Example:
https://github.com/nextstrain/narratives/blob/master/interpretation-examples.md
https://nextstrain.org/narratives/interpretation-examples?n=4

@sidneymbell sidneymbell added bug Something isn't working narratives issues / PRs relating to narrative functionality regression used to work but now doesn't labels Sep 22, 2020
@huddlej huddlej added the office-hours Issue mentioned during office hours label Jan 13, 2022
@joverlee521
Copy link
Contributor

Auspice renders narrative Markdown text through marked, which uses GitHub Flavored Markdown (GFM) by default.

According the GFM guide, Markdown syntax does not work within HTML blocks since text is treated as raw HTML text. There also needs to be a blank line after the HTML tags to separate it from the rest of the Markdown content. So the main problem outlined in this issue is a limitation of the Markdown syntax rather than a bug.

The specific observed behavior with the <b> tag not working is because it is not included in Auspice's ALLOWED_TAGS. We can allow <b> tag, but in the meantime users can bold text using the <strong> tag.

@joverlee521 joverlee521 self-assigned this May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working narratives issues / PRs relating to narrative functionality office-hours Issue mentioned during office hours regression used to work but now doesn't
Projects
No open projects
Status: Prioritized
Development

No branches or pull requests

3 participants