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

Bug 1772684 - Support Markdown style language syntax for fenced code block. #25

Merged
merged 1 commit into from
Jun 24, 2022

Conversation

arai-a
Copy link

@arai-a arai-a commented Jun 4, 2022

Phabricator uses remarkup for comment markup, and it supports lang=cpp style option to enable syntax highlighting for the fenced code block.

Bugzilla and Matrix uses markdown (or maybe variant?), and Searchfox has a feature to copy a code block with Markdown-style (https://bugzilla.mozilla.org/show_bug.cgi?id=1769936), that uses just cpp to specify the language.

This patch adds fallback path for the case that code block rule doesn't detect lang=cpp style options, to use the cpp style.

To avoid unexpected result, the fallback happens only when it's in the same line as the backticks, followed by newline.

Copy link
Collaborator

@dklawren dklawren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. r=dkl

@dklawren dklawren merged commit 341ac91 into mozilla-conduit:master Jun 24, 2022
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.

2 participants