giellalt / giella-core

Build tools and build support files as well as developer support tools for the GiellaLT repositories.
https://giellalt.uit.no
GNU General Public License v3.0
7 stars 2 forks source link

Errors in AWK script converting in-source jspwiki to markdown #4

Closed snomos closed 3 years ago

snomos commented 3 years ago

The first test docs can be found in lang-sma - scroll to Documentation and click In-source documentation. The following things should be fixed:

Add more bugs to the list above as they are found, and we can check them off as they get fixed.

flammie commented 3 years ago

tables can be a non-trivial problem, github probably requires a header row for all tables underlined, I noticed this is more lenient in jekyll which renders more broken tables.

th1 th2
td1 td2
td3 td4

works

| td1 | td2 |

does not?

snomos commented 3 years ago

Yes, it seems so. That is, we need to convert:

|| header || text
| table  | content

to:

| header | text
| --- | ---
| table  | content

with an equal number of | --- sequences as the number of columns, and such that the top row is not reprocessed as a regular table line.

snomos commented 3 years ago

In cases where there is no header row, the only thing we can do is go and fix the source manually, IMHO. That will also make the table easier to read.

snomos commented 3 years ago

The present state of the table header conversion code is now as follows:

If you can fix these two things, that would be a big YAY! @flammie

snomos commented 3 years ago

This seems to work as it should, and have been for a while. Closed