sphinx-markdown-tables icon indicating copy to clipboard operation
sphinx-markdown-tables copied to clipboard

links inside the table are not being proceeded by recommonark

Open ztomsy opened this issue 5 years ago • 3 comments

if i try to insert links into table and it seems that it being proceeded in html conversion process, so later recommonark could not proceed it as md links.

example: md src: image

finally rendered as:

image

will very appreciate for advice how to fix it

ztomsy avatar May 07 '19 11:05 ztomsy

Couple ideas:

  1. When writing your source files, you could replace the links to .md files inside your tables with the actual path to the final page - e.g. action_order.html instead of action_order.md in the case above
  2. You could automate it - maybe after sphinx runs, search for href=.*.md and replace with the correct url
  3. You could see if there is a later build stage that will work to replace the tables. The extension currently uses source-read, but there may be one that fires after sphinx rewrites the links. PRs are welcome if you find something that works for you.

ryanfox avatar May 29 '19 05:05 ryanfox

Hi all,

I am encountering this problem now in our project, and I've opted for @ryanfox's option 2:

You could automate it - maybe after sphinx runs, search for href=.*.md and replace with the correct url

It works wonderfully when I run it locally, but it's not working when I try to do it on the Read the Docs build.

Has anybody gotten this option working on Read the Docs? If so, could you point me to a configuration that works?

I have written up all the details on a StackOverflow question here: https://stackoverflow.com/questions/73455350/how-to-modify-documentation-built-with-sphinx-via-a-script-in-readthedocs-build

lanctot avatar Aug 23 '22 11:08 lanctot

I have found a solution to my problem... it's a mix between @ryanfox's solution (1) and (2). Actually, it's just solution (2), but do the rewriting of the markdown files pre-build rather than of the html files post-build. It's now working, commit details here if anybody's curious.

lanctot avatar Aug 23 '22 12:08 lanctot