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

https://flows.nodered.org/ doesn't correctly format node readme page #29

Open
rsenden opened this issue May 31, 2019 · 2 comments
Open

Comments

@rsenden
Copy link

rsenden commented May 31, 2019

It looks like flows.nodered.org is handling Markdown formatting differently than GitHub and npmjs.com. For example, the readme file for https://github.com/rsenden/node-red-contrib-map is displayed correctly on both GitHub and on https://www.npmjs.com/package/node-red-contrib-map, but parts of the list entries are incorrectly displayed as code blocks on https://flows.nodered.org/node/node-red-contrib-map.

I guess this may be due to leading spaces within those list entries. I could easily fix this in a new version of the plugin, however it would make more sense if flows.nodered.org would handle the Markdown formatting the same as GitHub and npmjs.com.

@knolleary
Copy link
Member

knolleary commented May 31, 2019

@rsenden the flow library repository is here: https://github.com/node-red/flow-library. This is the repository for the main website. I will transfer this issue over to that repository.

edited my comment - I misread this to be related to image handling - which is where I was talking about edge cases due to the way npm/github remap urls for where they host images in your repo.

We use the marked library - https://www.npmjs.com/package/marked - for markdown parsing and rendering. If there is a better library or one that is closer to what github and npm uses, then we could consider it. But the main point being, we don't do the parsing ourselves, so unless there's a simple switch out of a library, then it's unlikely we can do much.

@knolleary knolleary transferred this issue from node-red/node-red.github.io May 31, 2019
@rsenden
Copy link
Author

rsenden commented May 31, 2019

I think most Markdown implementations consider text that's indented with a certain number of spaces as code blocks, but most implementations require an empty line before and after the code block. Apparently marked considers any indented text as a code block independent of whether it is preceded by an empty line, thereby causing the formatting issue with my readme.

We could consider filing an issue with marked, but in the short term I guess it's easier to update my readme file.

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

No branches or pull requests

2 participants