doxygen icon indicating copy to clipboard operation
doxygen copied to clipboard

\fileinfo and \lineinfo won't expand inside url, also adds extra spaces

Open cwm9cwm9 opened this issue 1 year ago • 1 comments

Describe the bug \fileinfo and \lineinfo fails to expand inside a URL, and \fileinfo:\lineinfo has an unwanted space before the ':'

To Reproduce Insert into some doxygen content:

[\fileinfo{filename} at line \lineinfo](vscode://file/\fileinfo{full}:\lineinfo)

vscode://file/\fileinfo{full}:\lineinfo

Expected behavior

[package-info.java at line 56](vscode://file/C:/someproject/src/main/java/somepackage/package-info.java:56)

vscode://file/C:/someproject/src/main/java/somepackage/package-info.java:56

A clickable url that open VS Code to the file and line number, and a valid, but non-clickable url

Actual output

[package-info.java at line 54](vscode://file/\fileinfo{full}:\lineinfo)

vscode://file/C:/someproject/src/main/java/somepackage/package-info.java :56

A non-expanded url and an almost-correct non-clickable URL

Version 1.10.0, Windows 10 64 bit

cwm9cwm9 avatar May 16 '24 06:05 cwm9cwm9

The line:

[\fileinfo{filename} at line \lineinfo](vscode://file/\fileinfo{full}:\lineinfo)

is translated into the line:

<a href="vscode://file/\fileinfo{full}:\lineinfo" >\fileinfo{filename} at line \lineinfo</a>

and here the href parts is between double quotes signalling a literal string and as such commands are in general not evaluated in it. See also that the content of a string like:

"vscode://file/\fileinfo{full}:\lineinfo"

is placed literally in the output.

I'm doubting between usage and a nice enhancement to have the \fileinfo and \lineinfo evaluated in the (...) part of the markdown type of link.

@doxygen what do you think?

Regarding the unwanted space: This is gone in the current master, but has as side effect that also the space in [\fileinfo{filename} at is gone, replacing this space with a &nbsp; solves that problem.

albert-github avatar May 16 '24 09:05 albert-github