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

Angled brackets not rendering in markdown #118

Closed
TimShererAtAquent opened this issue Jun 2, 2016 · 2 comments
Closed

Angled brackets not rendering in markdown #118

TimShererAtAquent opened this issue Jun 2, 2016 · 2 comments

Comments

@TimShererAtAquent
Copy link

Angled brackets are used in plaintext to indicate placeholder text, as follows: (Example from Get-Help.md)

“To see a particular topic, type: Get-Help about_, such as Get-Help about_Comparison_Operators.”

The result lacks the content in the brackets:

“To see a particular topic, type: Get-Help about, such as Get-Help about_Comparison_Operators.”

(There is a separate issue about the underscore after the word “about”. I haven’t found that in other topics, yet, so I can’t describe exactly when it happens.)

The markdown is probably reading as an XML tag.

Possible solution:

Replace angled brackets in text with < and >. (ampersand-l-t or g-t)

No change for angled brackets in code blocks – these work and shouldn’t be tinkered with.

I don’t know whether this will work and render correctly in the XML, but it works in atom preview mode.

angled brackets 01
angled brackets 02

@vors
Copy link
Collaborator

vors commented Jun 2, 2016

We are trying to follow CommonMark spec, and it allows us to do escaping with \< instead of &lt.

Atom / VSCode has an issue with their markdown preview. One of the industry-wide challenges is markdown variations. We supporting CommonMark, because it has a really good spec and set of tests for implementations. Also it's mostly compatible with GitHub Flavored markdown.

When you call New-Markdown in PlatyPS, we inject escaping for < and > in the form on \< and \>. Same goes about [ ] ( ) and back-ticks.

@TimShererAtAquent
Copy link
Author

Per JP's suggestion, I looked at the topic in GitHub. The brackets escape correctly, as expected from the spec. Let's mark this issue closed.

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