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] Numbering on preview does not match actual site #250

Open
seaerchin opened this issue Jan 26, 2022 · 1 comment
Open

[BUG] Numbering on preview does not match actual site #250

seaerchin opened this issue Jan 26, 2022 · 1 comment
Labels
wontfix This will not be worked on

Comments

@seaerchin
Copy link
Contributor

Bug Description
Certain lists with markdown content and linebreaks don't render as expected in the actual site, even though the preview appears correctly.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the CMS
  2. Click on My Workspace
  3. Paste the following chunk in the editor and note how it looks then click save.
  1. This is number one

**something**

  1. Do you want cookies

```
Cookie monster
```

a. i love cookies

  1. Go to the staging site and compare

Expected behavior
The numbers should not be reseted after a markdown chunk (here, the bolded portion). Instead, the numbers should continue normally.

Screenshots

preview render
image

site render
image

Note that both the font in the codebox as well as the numbering are reset.

Possible Causes
the default engine that jekyll uses is actually github flavoured markdown. this leads to multiple differences between actual markdown rendered text and gfm rendered text, which results in the differences shown above.

Possible Fixes

  1. we could change our markdown parser to kramdown/markdown, which should solve this issue. however, this means that sites that use these quirks will experience a visual regression.
  2. we could just inform the users of the fix. the differences between rendered/actual text don't really come up (~1 every few months) so it's not really a core issue. we can instead show users how to fix these issues due to the low rate of occurrence.

This issue will not be tackled now due to its low importance (low rate of related tickets).

@seaerchin seaerchin added the wontfix This will not be worked on label Jan 26, 2022
@seaerchin
Copy link
Contributor Author

after further investigation, the mystery deepens:

  1. the frontend renders the html using markedjs, which has the gfm option set to true by default. this means that functionally, there should not be any difference between the actual/preview sites.
  2. from the above, the main culprit is likely to be the converter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant