You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a custom format for providing extra attributes to a piece of content.
Example format as
^[CONTENT](Attributes go here)
The reason behind using this format is because it is supported out-of-box from iOS which we do understand it is NOT part of commonmark.
After few attempts, we got there, like 90%.
Problem
We found out that when the content is in certain format, the parser takes Link parsing as higher priority and render it as
content as
This is considered as a LINK somehow
^[NoAttributes]( 'u': 'underline' ) suffix
I believe this is cause by Link parse runs first?
Help needed
Would like to get some help on this issue to see either we can:
Change priority of parsing
Configure Link parser to ignore ^[]() format.
Any suggestion would be helpful.
Snippet
class AttributesDelimiterProcessor: DelimiterProcessor {
override fun getOpeningCharacter(): Char = '^'
override fun getClosingCharacter(): Char = ')'
override fun getMinLength(): Int = 1
override fun process(
openingRun: DelimiterRun?,
closingRun: DelimiterRun?
): Int {
// Seems like doesn't matter how you'd process it.
}
}
The text was updated successfully, but these errors were encountered:
The class that may help LinkProcessor. As mentioned the markdown is being processed before it gets to the DelimiterProcessor.
You may be able to implement a LinkProcessor check the LinkInfo.marker() and see if the marker is a ^, you can then use LinkResult to ignore or move the logic from DelimiterProcessor and wrap or replace the node.
Background
We have a custom format for providing extra attributes to a piece of content.
Example format as
The reason behind using this format is because it is supported out-of-box from iOS which we do understand it is NOT part of commonmark.
After few attempts, we got there, like 90%.
Problem
We found out that when the content is in certain format, the parser takes Link parsing as higher priority and render it as
content as
I believe this is cause by Link parse runs first?
Help needed
Would like to get some help on this issue to see either we can:
^[]()
format.Any suggestion would be helpful.
Snippet
The text was updated successfully, but these errors were encountered: