Closed Bug 1772684 Opened 3 years ago Closed 2 years ago

Support the fenced code block's syntax-highlighting language part without `lang=` prefix

Categories

(Conduit :: Phabricator, enhancement)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: arai, Assigned: arai)

Details

Attachments

(1 file)

Steps to reproduce:

  1. comment on the phabricator revision with the following
https://searchfox.org/mozilla-central/rev/f818cf7d7a46728a66b4dcfece73dc017da43f98/js/src/builtin/TestingFunctions.cpp#585-589
```cpp
static bool IsLCovEnabled(JSContext* cx, unsigned argc, Value* vp) {
  CallArgs args = CallArgsFromVp(argc, vp);
  args.rval().setBoolean(coverage::IsLCovEnabled());
  return true;
}
```

Actual result:
the cpp becomes part of the fenced code block

Expected result:
the cpp part is handled as language for the syntax highlighting, or just ignored

looks like it's not markdown, but it's another syntax called "remarkup"
https://phabricator.services.mozilla.com/book/phabricator/article/remarkup/

and the following works:

https://searchfox.org/mozilla-central/rev/f818cf7d7a46728a66b4dcfece73dc017da43f98/js/src/builtin/TestingFunctions.cpp#585-589
```lang=cpp
static bool IsLCovEnabled(JSContext* cx, unsigned argc, Value* vp) {
  CallArgs args = CallArgsFromVp(argc, vp);
  args.rval().setBoolean(coverage::IsLCovEnabled());
  return true;
}
```

I wonder if we can tweak the syntax to support language without lang=

Summary: Do not render the fenced code block's language part → Support the fenced code block's language part wihtout `lang=` prefix
Attached file GitHub Pull Request
Assignee: nobody → arai.unmht

(Updating the subject to include "syntax-highlighting" because I almost filed a dupe of this and I expect this will now be a very common request as I do constantly find myself using the new searchfox options and then constantly a little sad that phabricator doesn't handle it while github does in its github flavored markdown fenced code block support. I'm very excited to see :arai already has a patch up, though! Woo!)

Summary: Support the fenced code block's language part wihtout `lang=` prefix → Support the fenced code block's syntax-highlighting language part without `lang=` prefix
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: