mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-01 09:44:18 +00:00
nixos-render-docs: allow dots in heading ids
this is used by release notes (and we don't want to break links to those), and is also technically allowed anyway. we will *not* extend the regex to allow more characters just yet due to a mozilla recommendation against it (cf https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id)
This commit is contained in:
parent
fd9f6c7501
commit
6cd368870b
@ -349,7 +349,7 @@ def _block_comment_plugin(md: markdown_it.MarkdownIt) -> None:
|
||||
|
||||
md.block.ruler.after("code", "block_comment", block_comment)
|
||||
|
||||
_HEADER_ID_RE = re.compile(r"\s*\{\s*\#([\w-]+)\s*\}\s*$")
|
||||
_HEADER_ID_RE = re.compile(r"\s*\{\s*\#([\w.-]+)\s*\}\s*$")
|
||||
|
||||
def _heading_ids(md: markdown_it.MarkdownIt) -> None:
|
||||
def heading_ids(state: markdown_it.rules_core.StateCore) -> None:
|
||||
|
Loading…
Reference in New Issue
Block a user