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

Minor syntax highlighting issue with link in source tag #327

Closed
bric3 opened this issue Sep 5, 2019 · 6 comments
Closed

Minor syntax highlighting issue with link in source tag #327

bric3 opened this issue Sep 5, 2019 · 6 comments

Comments

@bric3
Copy link
Contributor

bric3 commented Sep 5, 2019

When a link is declared in the [source,title=...] the right brackets are mis-rendered, both are highlighted in orange, only the outmost should be highlighted I think.

:url-hprof-heap: https://github.com/oracle/visualvm/blob/9a43222f488b8f9e9fba71363c4bcd056c532948/visualvm/libs.profiler/lib.profiler/src/org/graalvm/visualvm/lib/jfluid/heap/HprofHeap.java#L70-L109

[source,title={url-hprof-heap}[Hprof heap tags]]
----
    // dump tags
    static final int STRING = 1;
----

image

The parser probably don't understand this kind of nesting. Yet the preview works fine.

@ahus1 ahus1 added the bug label Sep 5, 2019
@ahus1
Copy link
Contributor

ahus1 commented Sep 5, 2019

Thank you for reporting this. Never used that combination before...

@bric3
Copy link
Contributor Author

bric3 commented Sep 5, 2019

No problem. Thank you for this plugin !!!!

@mojavelinux
Copy link
Member

In this case, the value should be wrapped in single quotes.

[source,title='{url-hprof-heap}[Hprof heap tags]']

You could also write it as:

.{url-hprof-heap}[Hprof heap tags]
[source]

@bric3
Copy link
Contributor Author

bric3 commented Sep 10, 2019

@mojavelinux Ah yes that's way better, thanks a lot for the suggestion !

ahus1 added a commit that referenced this issue Sep 17, 2019
@ahus1
Copy link
Contributor

ahus1 commented Sep 17, 2019

Release 0.30.6 adds highlighting support for attribute references both

[source,title='{url-hprof-heap}[Hprof heap tags]']

and

.{url-hprof-heap}[Hprof heap tags]

@ahus1 ahus1 closed this as completed Sep 17, 2019
@bric3
Copy link
Contributor Author

bric3 commented Sep 18, 2019

@ahus1 Cool thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants