markup icon indicating copy to clipboard operation
markup copied to clipboard

Math equation inside table breaks all relative links

Open JJCUBER opened this issue 2 years ago • 2 comments

When in the readme of a repository, adding any math/LaTeX equation (anything which uses $'s) within a table breaks all the relative links inside the table. If the repository is called repo, then the links resolve to .../username/file_name, when they normally resolve to .../username/repo/blob/main/file_name. (This results in a not found.)

The layout of the tables that work vs tables that don't are as follows (note that the link resolving is different on an issues tab vs within a repository's top-level readme, so the links will not seem different within this issue):

1 2
notes a = b

image

1 2
notes $a = b$

image


I made the issue on this repository because this seems to most likely be an issue related to the autolinking step of GitHub Markup. I wonder if the autolinking-related step skips over processing the entire table's html, since it is known to be modified by MathJax.

JJCUBER avatar Nov 18 '23 20:11 JJCUBER

Upon further inspection, this seems to also occur outside of a table if the equation is on the same line as a link (such as [link](filename) $eqn$).

JJCUBER avatar Nov 18 '23 21:11 JJCUBER