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

npmjs.com description of compatible session stores garbled #248

Closed
Hermholtz opened this issue Jan 4, 2016 · 6 comments
Closed

npmjs.com description of compatible session stores garbled #248

Hermholtz opened this issue Jan 4, 2016 · 6 comments
Assignees
Labels

Comments

@Hermholtz
Copy link
Contributor

https://www.npmjs.com/package/express-session#compatible-session-stores
There are markdown-like tags instead of sensible display.

@dougwilson
Copy link
Contributor

Hi! AFAIK, that was working just fine before when I published and nothing has changed. Perhaps it is a bug in their markdown rendering? Can you file a bug against their website, please?

@cianclarke
Copy link
Contributor

@dougwilson @chojrak11 Done some digging on this, here's what I've found:

  • npm/newww uses npm/marky-markdown to parse it's markdown. npm/marky-markdown uses markdown-it/markdown-it in "default mode" to parse markdown.
  • Here's a testcase of feeding a reduced testcase of this repo's README.md into markdown-it/markdown-it. Note the expected and actual result.
  • However, I've also fed the example into the CommonMark Dingus and found the output produces a result as observed in actual.html - so not sure what to make of this..
  • This seems to be caused by the lack of a newline separating the reference definition from the usage of said reference. I can't find the specific point in the CommonMark definition for references which explicitly enforces this behavior, but note all their examples include this newline whitespace.
    Maybe my grep is broken.. Other eyes on this document might help!

tl;dr: It looks like this Markdown is more than likely not to spec, but I'm not 100% sure. You can fix this issue by moving all your "Compatible Session Stores" references to the bottom of the file, or by introducing whitespace. I've done this here, but maybe you'd rather get to the bottom of the "is this to spec" question - your call :-)

@dougwilson
Copy link
Contributor

Wow, @cianclarke, thank you so much for taking the time to dig in and look! And even more thanks for the pull request :)!

@revin
Copy link

revin commented Mar 2, 2016

Hi everyone, we're tracking this in marky-markdown; I just wanted to point out that the part of the CommonMark spec that I think is causing this behavior is example 166 (172 in the latest 0.24 version of the spec), where it says, "a link reference definition cannot interrupt a paragraph".

That said, our goal is to be able to render anything github can render, so I'm going to look at relaxing that rule in our implementation.

Thanks!

@dougwilson
Copy link
Contributor

Awesome, thanks, @revin!

@cianclarke
Copy link
Contributor

@dougwilson No problem!
Thanks @revin for pointing out the behavior in CommonMark Spec defining why this is wrong - my spec-grep was indeed broken, hah!

dougwilson pushed a commit that referenced this issue Jun 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants