AndroidAPSdocs
AndroidAPSdocs copied to clipboard
Update Glossary.md
Convert HTML to Markdown
Thank you @typeonedev. I have seen your PR but must check if the recommonmark parser is capable to parse the markdown table. I will give you feedback tomorrow.
The recommonnmark parser does not understand tables in markdown at all.
The (old) extension sphinx_markdown_tables works unfortunately not correct. It produces wrong html code.
I think we have to wait because of other dependencies until we finally migrated all files from rst to md format to accept this PR. It's on the timeline midterm this year but it's the plan and not a commitment at the moment.
No worries. Pushing the football down the field. I could possibly help with some of the rst to md conversion if that would speed things up. Found this guide which may be helpful for rst migration:
https://docs.readthedocs.io/en/stable/guides/migrate-rest-myst.html#migrating-from-restructuredtext-to-myst-markdown
It mentions a MyST markdown flavor, which I hadn't heard of before. This change was just tested using the Github preview which seems to be going through a different parse path. There are two things about the formatting I used in this change that I'm thinking might need tweaking for MyST if that's what's needed:
- Row separator format in the table syntax: According to this MyST markdown cheatsheet there seems to be a slightly different syntax for tables that includes a prefix colon in first colum and postfix colon in last column. I wasn't doing that, I was just using "three or more hyphens" as the row separator. The example in the MyST cheat sheet looks something like this:
| a | b |
| :--- | ---: |
| c | d |
- Bold formatting: I used double underscore
__
for bold emphasis in this conversion instead of double asterisk**
just out of personal preference, but I think double asterisk is more common and may be required by MyST markdown. If so then that would be an additional thing to change.
@typeonedev We are now on myst_parser and have converted the files to markdown. Ich will check your PR the next days.
@typeonedev unfortunately the compiler doesn't restrict column width hence doesn't force line feeds on long sentences. The result is that you need to scroll horizontally to see the last 2 columns, which can be confusing for users. A solution would be to introduce line breaks in the text but I don't know how much translators will like that... same problem with https://github.com/openaps/AndroidAPSdocs/issues/1960 that I will withdraw.