-
Notifications
You must be signed in to change notification settings - Fork 25
problem with github markdown parser #65
Comments
Feel free to open a pull request to make the suggested changes. However, if you do, please see what happens when you run the documentation through mkdocs, to ensure that the final output does not contain the escape characters. |
@weierophinney |
@froschdesign I recognize that. My point is if we do any pull requests that add the escape characters, we need to ensure they do not impact generation by mkdocs. |
@weierophinney |
We should eliminate the tables, because they do not work for mobile / smaller screens. My suggestions:
Example: #### *public* renderMenu(AbstractContainer $container = null, array $options = []) : string
Renders helper
Renders a HTML 'ul' for the given $container. If $container is not given, the container registered in the helper will be used.
* `param` AbstractContainer $container [optional] container to create menu from. Default is to use the container retrieved from {@link getContainer()}.
* `param` array $options [optional] options for controlling rendering
##### Returns
string Output:
|
That's essentially the direction we went with the ZF2 docs originally; the problem I encountered was difficulty ensuring that all submissions followed the same format. Additionally, there are definitely cases where tables help. For example, when a config option maps to a method name, and you want to provide a description. That was one area I tried not using tables previously, and found tables were more intuitive, and easier to understand when you were reading. I understand your argument about mobile devices. However, how often are folks reading the docs on mobile when they need to understand how config keys, methods, etc. work? In most of those cases, I'd expect they'd be reading from whatever machine they're developing on, and, at worst, a tablet. I'm wary about optimizing away intuitive layouts. 😄 |
@weierophinney The table is too large on each device. 😉 |
@froschdesign @weierophinney Maybe we just need improve our docs templates and add better support for tables - responsive tables? |
Already there with Bootstrap's "Responsive tables". But the problem still stands: the pipe symbols here on Github (and other Markdown parsers). Look at the first table: Menu - wrong rendering for |
@froschdesign I was digging a bit and the only one working solution with github and mkdocs what I have found is: <code>getPartial() : string|array</code> I've tried escaping I found also suggestion to use double `` and then don't escape
but it works only with mkdocs, not with github. The other solution will be to escape |
Or my previous suggestion without tables. 😉
Which is a quite ugly work and it will always introduce errors. |
I had another thought and I would go with escaping pipes with `getPartial() : string\|array` and add script to @froschdesign What do you think? |
@webimpress
For tables I use a Markdown table generator and this generator (and all others I tested) doesn't support the escaping. 😢 |
@froschdesign I think you misunderstand me.
I've done it and tested in zendframework/zf-mkdoc-theme#30 and #66. |
Right, you mean not the table elements itself, but all other pipes in tables. But I do not see any other solution, so it's okay for me. 👍 |
Are there any serious errors you can think of? If we want to have escaped pipeline in table also in html then in markdown it will be escaped 'twice': Please notice also that I've used |
Sure and quite simple:
Both are sources of error. |
@froschdesign Wait, wait ... This is not serious issue then 😅 Another one? 👿 |
Don't get me wrong. Your fix is okay, but I see problems writing the documentation. You always have to remember that extra characters have to be set. "Remember" - There I see the error / problem! 😉 |
Hello,
following a short discussion with @froschdesign I report an issue with the github markdown parser regarding pipe symbols.
The pipe sign | in markdown has a special meaning for tables and must therefore be commented out if used otherwise.
As an example, have a look at the table in menu.md.
The final documentation doesn't show the error, but github and maybe other markdown parsers do.
Cheers,
LT.
The text was updated successfully, but these errors were encountered: