Fortran-FOSS-Programmers / ford

Automatically generates FORtran Documentation from comments within the code.
https://forddocs.readthedocs.io
GNU General Public License v3.0
402 stars 131 forks source link

Aliases in tables #604

Closed Meax5qiu closed 7 months ago

Meax5qiu commented 7 months ago

Sometimes, tables and aliases are competing for pipe symbols |, and the table wins:

title: Aliases in tables

[Working link](|page|/other)

| Table Col 1 | Table Col 2 |
| ----------- | ----------- |
| normal | entry |
| [Broken link](|page|/other) |

looks like this (on Ford 6.2.5):

image

Expected/desired behaviour: Expansion of the alias, and only then processing of the table.

It would be sad if tables prevent you from using aliases; the ugly workaround would be, to hard-code whatever would be otherwise cleanly saved in aliases. Any chance to instruct the parser to swap the order of processing, so that it expands aliases before acting on tables?

Meax5qiu commented 7 months ago

I am aware that, whenever material follows a line where a table has officially exhausted the number of columns (defined by the title row), extra material is ignored:

| Table Col 1 | Table Col 2 |
| ----------- | ----------- |
| normal | entry | whatever I place here will be silently ignored ...

That might be worth a warning, but (AFAIK) this is standard Markdown behaviour and not specific to Ford.

ZedThree commented 7 months ago

Ah, that is an unfortunate clash of syntax. It should be simple enough to reorder the processing of aliases and tables, although we'll need to be careful that doesn't just then break tables!