strictdoc-project / strictdoc

Software for technical documentation and requirements management.
https://strictdoc.readthedocs.io/en/stable/
Other
156 stars 25 forks source link

LINKs: Unexpected output / crash if appending "s" to [LINK:] for plural #1907

Closed haxtibal closed 4 months ago

haxtibal commented 4 months ago

Sometimes we want to use an anchor as plural by appending "s", as in [LINK: ROLE-1]s. The example document below creates bad HTML that contains literal :rawhtml: when viewed in a browser, like πŸ”— System Integrator`s are expected to provide FIDO2 compliant hardware tokens. See :rawhtml:`πŸ”— Roles.

A modified version of the example, where one removes the final [LINK: ROLES], doesn't export at all but crashes with

error: problems when converting RST to HTML:
RST markup syntax error on line 1: Inline interpreted text or phrase reference start-string without end-string.

Example document to reproduce:

[DOCUMENT]
TITLE: Unexpected HTML for plural links

[SECTION]
UID: ROLES
TITLE: Roles

[TEXT]
STATEMENT: >>>
[ANCHOR: ROLE-1, System Integrator]
Service provider that specializes in bringing together component subsystems into a whole.
<<<

[/SECTION]

[SECTION]
TITLE: Assumptions

[TEXT]
STATEMENT: >>>
[LINK: ROLE-1]s are expected to provide FIDO2 compliant hardware tokens.
See [LINK: ROLES].
<<<

[/SECTION]