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

"normalizeLabelContent" should not convert all content to lower case #204

Closed
devkanro opened this issue May 6, 2021 · 3 comments · Fixed by #205
Closed

"normalizeLabelContent" should not convert all content to lower case #204

devkanro opened this issue May 6, 2021 · 3 comments · Fixed by #205

Comments

@devkanro
Copy link

devkanro commented May 6, 2021

Is your feature request related to a problem? Please describe.
I am building a protobuf language plugin for IntelliJ platform.
And I use the commonmark-java for document comment rendering.
I need to resolve the references in document like [selector][google.api.DocumentationRule.selector].
So I create a DelegateInlineParserFactory to intercept InlineParserContext instance.
But I found the parameter label of the getLinkReferenceDefinition method has been converted to lower case by String label = Escaping.normalizeLabelContent(ref); in line 326 of InlineParserImpl.java
The google.api.documentationrule.selector is not a valid symbol, so I can't resolve it to a reference link to language element.

Describe the solution you'd like
Maybe the case ignoring should not handle in InlineParserImpl, it should pass the original label value to InlineParserContext, let InlineParserContext decide whether to ignore case.

@robinst
Copy link
Collaborator

robinst commented May 8, 2021

Yeah I think that makes sense, I’ll have a look next week.

robinst added a commit that referenced this issue May 13, 2021
…ookup

This is useful for implementing a custom context that wants access to
the original label instead of lowercased and whitespace-collapsed.

Fixes #204.
@robinst
Copy link
Collaborator

robinst commented May 13, 2021

Raised a PR for this change, have a look: #205

@devkanro
Copy link
Author

@robinst Thanks for your work

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