Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cwm9cwm9 opened this issue May 16, 2024 · 1 comment
Open
Labels
Markdown Markdown translation input related issue needinfo reported bug is incomplete, please add additional info

Comments

@cwm9cwm9
Copy link

cwm9cwm9 commented May 16, 2024

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

@albert-github albert-github added needinfo reported bug is incomplete, please add additional info Markdown Markdown translation input related issue labels May 16, 2024
@albert-github
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Markdown Markdown translation input related issue needinfo reported bug is incomplete, please add additional info
Projects
None yet
Development

No branches or pull requests

2 participants