Skip to content

Fix conflict between BBCodePlus and MantisCoreFormatting Markdown#112

Open
bcp-software wants to merge 1 commit intomantisbt-plugins:masterfrom
bcp-software:feat-markdown-coexistence
Open

Fix conflict between BBCodePlus and MantisCoreFormatting Markdown#112
bcp-software wants to merge 1 commit intomantisbt-plugins:masterfrom
bcp-software:feat-markdown-coexistence

Conversation

@bcp-software
Copy link
Copy Markdown

When MantisCoreFormatting's Markdown mode is active, BBCodePlus was calling string_strip_hrefs() which destroyed links rendered by the Markdown parser (e.g. text -> text -> "text").

Skip string_strip_hrefs when Markdown is active so Markdown-generated links survive BBCodePlus's HTML->BBCode->HTML round-trip intact.

BBCode [tag] syntax and Markdown syntax are orthogonal and do not conflict, so both plugins can be active simultaneously. This allows sites with a mix of legacy BBCode tickets and newer Markdown tickets to display correctly without disabling either plugin.

Removes the conflict warning in content_begin() as it is no longer needed.

When MantisCoreFormatting's Markdown mode is active, BBCodePlus was
calling string_strip_hrefs() which destroyed links rendered by the
Markdown parser (e.g. [text](url) -> <a href="url">text</a> -> "text").

Skip string_strip_hrefs when Markdown is active so Markdown-generated
links survive BBCodePlus's HTML->BBCode->HTML round-trip intact.

BBCode [tag] syntax and Markdown **syntax** are orthogonal and do not
conflict, so both plugins can be active simultaneously. This allows
sites with a mix of legacy BBCode tickets and newer Markdown tickets to
display correctly without disabling either plugin.

Removes the conflict warning in content_begin() as it is no longer
needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant