You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've usually used document.note_explicit_target() and document.note_implicit_target() to register node IDs to document . But they don't support a node having multiple IDs.
from docutils import nodes
document = nodes.document(None, None)
target = nodes.target(ids=['foo', 'bar'])
document.note_explicit_target(target)
assert list(document.ids) == ['foo', 'bar'], document.ids # => foo was not registered
I think all of IDs for the node should be registered into the document.
commenter: tk0miya
posted: 2020-06-13 16:28:40.720000
title: #167 document.note_explicit_target does not support a node having multiple IDs
Any updates? Please let me know if my thought is incorrect.
commenter: grubert
posted: 2020-06-14 15:24:33.411000
title: #167 document.note_explicit_target does not support a node having multiple IDs
sorry. for the delay.
I will have a look ... and try to get someone more knowledgable to decide
commenter: milde
posted: 2020-07-09 08:48:31.165000
title: #167 document.note_explicit_target does not support a node having multiple IDs
I applied a version in r8522.
Unfortunately, I supoose that only David may tell whether direct specification of more than one ID could lead to problems later.
Docutils only adds an "alias ID" when merging nodes.
Also mind that IDs must conform to the "identifier normalisation" https://docutils.sourceforge.io/docs/ref/rst/directives.html#identifier-normalization, so it might be preferable to add "names" instead of "ids" and let Docutils do the rest.
The text was updated successfully, but these errors were encountered:
author: tk0miya
created: 2020-05-04 14:06:48.287000
assigned: None
SF_url: https://sourceforge.net/p/docutils/patches/167
attachments:
We've usually used
document.note_explicit_target()
anddocument.note_implicit_target()
to register node IDs to document . But they don't support a node having multiple IDs.I think all of IDs for the node should be registered into the document.
commenter: tk0miya
posted: 2020-06-13 16:28:40.720000
title: #167 document.note_explicit_target does not support a node having multiple IDs
Any updates? Please let me know if my thought is incorrect.
commenter: grubert
posted: 2020-06-14 15:24:33.411000
title: #167 document.note_explicit_target does not support a node having multiple IDs
sorry. for the delay.
I will have a look ... and try to get someone more knowledgable to decide
commenter: milde
posted: 2020-07-09 08:48:31.165000
title: #167 document.note_explicit_target does not support a node having multiple IDs
I applied a version in r8522.
Unfortunately, I supoose that only David may tell whether direct specification of more than one ID could lead to problems later.
Docutils only adds an "alias ID" when merging nodes.
Also mind that IDs must conform to the "identifier normalisation"
https://docutils.sourceforge.io/docs/ref/rst/directives.html#identifier-normalization, so it might be preferable to add "names" instead of "ids" and let Docutils do the rest.
The text was updated successfully, but these errors were encountered: