Skip to content

CW's Markdown engine gives inconsistent results between preview and actual result #1640

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

Closed
Voileexperiments opened this issue Nov 29, 2018 · 7 comments

Comments

@Voileexperiments
Copy link

An extension to #1441.

I'm not sure how is this even possible, but CW's Markdown engine apparently gives different results in "preview my comment" mode and in actual render, which I've encountered at least several times. One of the simplest examples is this:

~~should be striked~~next to correct text

In Github:

should be strikednext to correct text

In CW preview mode (correct):
image

In CW actual render (incorrect):
image

@Voileexperiments
Copy link
Author

Related: #1617

@kazk
Copy link
Member

kazk commented Nov 29, 2018

I'm not sure how is this even possible

I think the preview uses a client side engine Marked and the actual one is by a server side engine.
Markdown implementation was all over the place before CommonMark and it's from those days.

@kazk
Copy link
Member

kazk commented Dec 17, 2018

This will be fixed with the huge updates I've been working on for the past month. The Markdown engine on the server side will be Common Mark.

#1441 is not fixed and seems to be a styling issue Never mind, it produces <ul> and <ol> as siblings.

@Blind4Basics

This comment has been minimized.

@kazk
Copy link
Member

kazk commented Jan 6, 2019

How many spaces are there for the second level?

In this case, I think the preview is wrong.
The following

1. 1
2. 2
3. 3
  1. 3.a
  2. 3.b

is
image

on GitHub comment.

If you indent the second level with 4 spaces, you should get

image


Markdown preview uses a different engine on the client side so the best I can do is to find options to make it agree with the server side. And I haven't looked into this yet.

@Blind4Basics
Copy link

I used indentations with 2 whitespaces

@kazk
Copy link
Member

kazk commented Mar 4, 2019

I've updated to the latest version of marked. They're still working on becoming fully compatible with CommonMark spec, but it should be much better than the version we were using.

@kazk kazk closed this as completed Mar 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants