-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Removed HTML tags from Markdown trait export #19403
Conversation
Looks reasonable, but have you tested it works? I usually find it takes 5+ attempts to get tables to actually render whenever I try to make one. The other doc generating commands should be changed to match. |
I tested with @retext-project and @mkdocs locally. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works nicely.
The other doc generating commands should be changed to match.
That is still open, isn't it?
If you insist. As MarkDown forbidds linebreaks in tables I had to come up with something else for the Lua page. |
What do you mean? Do you have a before and after image? Some quick searching suggests that |
| Test
|
I came up with forced tables for the Lua API to preserve your original layout although I think headerless tables were a really bad choice here. It really gave me a hard time here and it isn't very readable in .md viewers. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a8373b1
to
bbd013f
Compare
Should be fixed now. |
I put the output file I got at https://gist.github.com/abcdefg30/6610bdfaa06e4c00dd209a71dd83aa0c, then you can hopefully easily see the spots with that issue. (Or is that a bug in the GitHub Markdown renderer?) |
A Markdown table is required to have a header, which is why @pchote original design is causing trouble here: |---|---| won't work. |
e9081a0
to
d35dd03
Compare
I simply added headers with contents as GitHub flavored Markdown and many others don't support headerless tables. https://stackoverflow.com/questions/17536216/create-a-table-without-a-header-in-markdown |
GitHub flavored markdown does support headerless table, I demonstrated this in the comment above: #19403 (comment). Edit: I see, that was the header. |
This comment has been minimized.
This comment has been minimized.
Since the previous comment has been marked off-topic: An alternative way to highlight code in HTML-tables is: <table>
<tr><th>Property</th><th>Default Value</th><th>Type</th><th>Description</th></tr>
<tr><td>ValidTypes</td><td></td><td>Set of String</td><td>Accepted <code>DeliversCash</code> types. Leave empty to accept all types. </td></tr>
<tr><td>ValidRelationships</td><td>Ally</td><td>PlayerRelationship</td><td>Player relationships the owner of the delivering actor needs. </td></tr>
<tr><td>Sounds</td><td></td><td>Collection of String</td><td>Play a randomly selected sound from this list when accepting cash. </td></tr>
</table> <code>DeliversCash</code> This is valid HTML, perhaps someone misread the comment… Edit: Deleted some formatting changes and actual off-topic moderation-related content since i just wanted to drop this information here and not engage in discussions. Maybe it helps, maybe not. |
But then there is nothing Markdown left and both @github and @readthedocs take that as input. The HTML is compiled from it. |
Why do we care about eliminating html from this? Surely the goal should be in having the best quality rendered output. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm once that is fixed, I don't think we need or should go back now.
d35dd03
to
441558f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine aside from two points:
Updated. |
4348e76
to
024f4d6
Compare
Updated. |
I'm not sure if the last push broke it or if I just didn't notice it before, but the output of the lua player properties/commands all end up on one line (the other two lua types are output correctly). |
024f4d6
to
a4e184d
Compare
Should be fixed now. |
This is a workaround for mkdocs/mkdocs#2400, but I thought it might actually be nicer as Markdown is easier for humans to read compared to hard-coded HTML tags.