Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upDouble-backtick links seem broken #88
Comments
This comment has been minimized.
This comment has been minimized.
|
I think this means that Markdown isn't being run on the doc string? Do you observe other formatting not being applied? |
This comment has been minimized.
This comment has been minimized.
|
Nope other markdown seems to get processed fine. Maybe some transformations are happening in the wrong order somewhere? |
This comment has been minimized.
This comment has been minimized.
|
I'm not sure what the problem is. The call to markdown is pretty vanilla: https://github.com/BurntSushi/pdoc/blob/master/pdoc/templates/html.mako#L62-L72 |
This comment has been minimized.
This comment has been minimized.
|
Ah, from looking at I don't get any linkification with single backticks though. |
This comment has been minimized.
This comment has been minimized.
|
I think it might be that this line: |
This comment has been minimized.
This comment has been minimized.
|
The regex includes the backticks though, so match group |
This comment has been minimized.
This comment has been minimized.
|
Maybe this varies by python version or something? |
This comment has been minimized.
This comment has been minimized.
|
@mjwillson I don't know. I'm afraid you'll need to either do some debugging or provide enough reproduction details such that I can take a look at it. (I'm not sure when that will happen.) |
This comment has been minimized.
This comment has been minimized.
|
After investigating a bit more it seems the issue with double backticks is the regex matches the inner backticks, meaning the outer ones are retained around the replacement. After wiping /tmp/pdoc-3.4 I've managed to get it working with single backticks now though, looks like I was getting the old cached version. Sorry! |
mjwillson commentedJan 20, 2016
I'm not sure exactly if/how these were intended to work, but it looks like they're almost managing to do something quite useful. If I have text in docstrings referring to another class in double-backticks, like:
In the HTML output I see:
see foo.bar
on the package pages, or
see foo.bar
on the (sub)module pages. As in, I see the raw markdown for these links, with that bold formatting.
Note the former would be pretty useful if it was an actual link, as it links to the right page!