Fixed autolink showing and added examples #159
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi Mike. I noticed a problem while working with urls like in the example below.
<https://blog.mikepenz.dev/>
Markdown url syntax
In the current solution, it shown with brackets. I made a fix for that.
In Intellij's markdown parser it's called autolink. But for urls like in the markdown syntax, it has CompositeASTNode with 3 children.
One of them contains an autolink that does not equal MarkdownElementTypes.AUTOLINK due to it having the isToken property = true.
So, I implemented search of target element by element type name instead of getting all the text.
Also, I noticed that such kind of links doesn't have underscores if i use
SquigglyUnderlineSpanPainter
.I believe this happens because of unspecified color for span style while building the string for autolinks.
Also, I added some autolink examples for test markdown strings in app, app-desktop and app-wasm.