I am using commonmark-java 1.15.1 to render Atlassian Jira commonmark as HTML. I get the Jira commonmark from the Jira API.
The commonmark content I get from the API sometimes contains color markup. For example: {color:#00b8d9}Some text{color} some other text.
The color span markup is reproduced literally in the HTML output. For example: <p>{color:#00b8d9}Some text{color} some other text</p>.
Is this something I can handle by adding a commonmark-java extension? Or do I need to write a custom span handler for the color markup? At a minimum, I’d like to suppress the markup in the output HTML.
Does anyone have experience or advice? Or is there documentation other than the Javadoc that might cover this situation?
That’s not standard CommonMark. I’m surprised that Atlassian is publishing their Java CommonMark library under the auspices of “org.commonmark”, which seems to me misleading people to believe that this library is official and produced by CommonMark.org. //cc @jgm@codinghorror Perhaps I make a minor quibble?
@codinghorror not so much the extension but that they publish it with the Java package name of org.commonmark.* rather than com.atlassian.commonmark.* which is what they should do.
Companies use their reversed Internet domain name to begin their package names—for example, com.example.mypackage for a package named mypackage created by a programmer at example.com.
Not only is this misleading, it prevents CommonMark.org from publishing a Java implementation under its own name. That they are a commercial org doing this bothers me too. I would open an issue with them but it’s not my call.