useblocks / sphinx-needs-enterprise

Sphinx-Needs Functions for enterprise users
http://useblocks.com/sphinx-needs-enterprise/
Other
5 stars 1 forks source link

Capri raises warnings due to wiki text used by Codebeamer #11

Closed twodrops closed 2 years ago

twodrops commented 2 years ago

The context area of codebeamer uses a wiki syntax which during sphinx-needs import raises following warnings due to incompatibility with rst Syntax.

Inline strong start-string without end-string

Inline emphasis start-string without end-string

Anonymous hyperlink mismatch

twodrops commented 2 years ago

Strangely "Anonymous hyperlink mismatch" is raised as error and not warning. So not possible to ignore this as warning for now.

twodrops commented 2 years ago

Codebeamer allows to store the description as Wiki text or Plain text. If Plain text is used for storing there are no issues with capri, However the default is Wiki text.

image

Hopefully there is also API to fetch the context as text.

danwos commented 2 years ago

There is an REST API call available to render the wiki-syntax to HTML, which we could then use together with the .. html:: directive. image

For each item SNE gets also a value for descFormat, which can have one value of "Plain", "Html", "Wiki". Maybe we can set this during the request. I have not found any documentation for this, but I will make some tests.

So I suggest to have 2 new options: 1) Showing the content in a code-block, no matter what format the content has. 2) Transform the content to HTML, if there is a way.

If 2) is used, the content will be presented as part of an .. html:: directive, so the rendering should work.

1) and 2) can be used together. The results would be:

danwos commented 2 years ago

Codebeamer support issue created to ask how to transform from wiki to html syntax: https://codebeamer.com/cb/issue/6366002

danwos commented 2 years ago

Implemented with PR #15.

raw and wiki2html can be set for codebeamer based services.

For details take a look into http://useblocks.com/sphinx-needs-enterprise/services/codebeamer.html#raw