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

Pattern not properly escaped. #286

Open
JulienPalard opened this issue Apr 1, 2016 · 1 comment
Open

Pattern not properly escaped. #286

JulienPalard opened this issue Apr 1, 2016 · 1 comment

Comments

@JulienPalard
Copy link

I'm having a pattern containing < and > like:

{"kind": {"type": "string", "pattern": "List<User>", "example": "List<User>", "description": "Mandatory kind field."}}

Problem is, the generated markdown looks like:

| **kind** | *string* | Mandatory kind field.<br/> **pattern:** <code>List<User></code> | `"List<User>"` |                                                                                                                                   

Which is probably invalid, at least, pandoc fail to parse it and does not render a <table> for it.

A probably better solution would be to use backticks (while escaping backticks) instead of the inline-HTML <code> and </code> ?

I tried by adding an ugly sed -i 's#</\?code>##g' schema.mdin myMakefile` and it looks good.

@geemus
Copy link
Member

geemus commented Apr 4, 2016

It looks as though it already is using backticks, in so far as I can tell anyway: https://github.com/interagent/prmd/blob/master/lib/prmd/templates/schemata/helper.erb#L139

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