Zeugwerk / zkdoc-action

This GitHub Action builds DocFX docs from the specified TwinCAT PLC(s)
MIT License
10 stars 0 forks source link

Backslash escapes closing quote => strings that include paths get wrongly rendered. #1

Closed bengeisler closed 1 year ago

bengeisler commented 1 year ago

Inside of code sections, when using backslashes in quotes, the closing quote gets escaped and the following code gets rendered in red as string until the next (opening) quote is encountered.

Example:

image

Backslashes should not escape quotes in the code section.

iadonkey commented 1 year ago

Good catch, thanks. We are using highlight.js for syntax highlighting, I'll look into this. Maybe it a configuration issue or a bug on highlight.js that is already solved

iadonkey commented 1 year ago

@bengeisler the problem should be fixed, can you confirm please? I removed a rule in highlight.js that checks for the backslash in strings. In structured text you cant escape with \ anyway

bengeisler commented 1 year ago

It works like a charm now, thanks!

bengeisler commented 10 months ago

There seems to be a regression bug. Have a look here:

image
iadonkey commented 10 months ago

yeah, we were hoping that everybody just want to upgrade and use the new docfx. Using the old theme with the latest docfx has some more issues than just that. However, I added backwards compability now, if the statictoc theme is used we fallback to docfx 2.58. So if you run the github action again everything is back to normal

Next time we'll use a new tag for zkdoc-action to introduce such changes...

bengeisler commented 10 months ago

Thanks for your effort! However, there seems to be an issue with the workflow, it fails. I guess this is the relevant part of the output:

[2023-11-03 21:43:22] /var/jenkins_home/jobs/jobs/jobs/doc/builds/494/libs/caaa7562b8f587c1e1eeb041d0bc3569d872a38ba819be83090642efc4303bf6/vars/zkdoc.groovy: 96: unexpected char: '\' @ line 96, column 28.
[2023-11-03 21:43:22]                  bat "C:\\appl\docfx\\docfx.exe build docfx.json"
[2023-11-03 21:43:22]                               ^
iadonkey commented 10 months ago

you were a bit too fast :D should work now

bengeisler commented 10 months ago

It's working, thanks!