Skip to content
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

DOC: Try to keep <code> tags from appearing in rendered docs #1382

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

DWesl
Copy link
Contributor

@DWesl DWesl commented Nov 6, 2024

https://unidata.github.io/netcdf4-python/#netCDF4.Dataset
Scroll down to "format: underlying file format", which shows

'NETCDF3_CLASSIC'<code>, </code>'NETCDF3_64BIT_OFFSET'

This is also visible in the processed HTML here:

'NETCDF4_CLASSIC', 'NETCDF3_CLASSIC'&lt;code&gt;, &lt;/code&gt;'NETCDF3_64BIT_OFFSET'</code> or

I have no idea why it decided to (1) nest the code tags, instead of ending the already-open one and opening a second, nor (2) entity-escape the tags it added so they would show up in the rendered HTML (as opposed to giving directions to the browser).

Not sure if this should be ReST's double-backticks for code or Markdown's single backticks, though the default role Sphinx assigns to single backticks should work (though I have no idea if pdoc has an equivalent concept). In any case, it works everywhere else, so hopefully it works here too.

EDIT: pdoc seems to have an equivalent to Sphinx's `identifier`-> :any:`identifier` magic, at least in that placing a documented identifier in single ticks will link to the documentation for that identifier. It doesn't say whether double-backticks disables that, though.

https://unidata.github.io/netcdf4-python/#netCDF4.Dataset
Scroll down to `format`: underlying file format.

Not sure if this should be ReST's ``code`` or Markdown's `code`, though the default role Sphinx assigns to single quotes should work (:any:`code`, I think is how sphinx would interpret `code`).  In any case, it works everywhere else, so hopefully it works here too.
@jswhit jswhit merged commit ec06380 into Unidata:master Nov 12, 2024
1 check passed
@DWesl DWesl deleted the patch-1 branch November 14, 2024 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants