Skip to content

normal text after single-backtick linked reference rendered/recognized as code #260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zmoon opened this issue Sep 14, 2020 · 2 comments
Closed
Labels
invalid This is not a (valid) bug report

Comments

@zmoon
Copy link

zmoon commented Sep 14, 2020

I may just be doing something wrong though...

Actual Behavior

pdoc_bug1

Stuff on following lines gets recognized as code too.

If I don't include the comma, it breaks the page layout.

Steps to Reproduce

pdoc_bug2

Additional info

  • pdoc version: 0.9.1
@kernc
Copy link
Member

kernc commented Sep 14, 2020

'See Also' sections are special-cased:

pdoc/pdoc/html_helpers.py

Lines 188 to 191 in 39a1e73

if section == 'See Also':
body = re.sub(r'\n\s{4}\s*', ' ', body) # Handle line continuation
body = re.sub(r'^((?:\n?[\w.]* ?: .*)+)|(.*\w.*)',
_ToMarkdown._numpy_seealso, body)

to follow the numpydoc convention (§12):

See Also
--------
increment: same but sans type annotations

See also: numpy/numpydoc#170.

@zmoon
Copy link
Author

zmoon commented Sep 14, 2020

Ah, I see (also), thanks!

@zmoon zmoon closed this as completed Sep 14, 2020
@kernc kernc added the invalid This is not a (valid) bug report label Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This is not a (valid) bug report
Development

No branches or pull requests

2 participants