highlightjs/highlight.js

(C++) highlight incorrectly

Open

#3,505 opened on 2022年3月21日

GitHub で見る
 (3 comments) (0 reactions) (0 assignees)JavaScript (3,497 forks)batch import
buggood first issuehelp welcomelanguage

Repository metrics

Stars
 (22,960 stars)
PR merge metrics
 (平均マージ 6m) (30d で 2 merged PRs)

説明

Describe the issue

Screenshot_20220320_225211

Everything after the define line has no highlighting.

Which language seems to have the issue?

C++

Are you using highlight or highlightAuto?

highlight.js 11.5.0

Sample Code to Reproduce

int a = 1;

#define what do { cout << ">"; } while (0)

int main() {
}

Expected behavior

Highlight correctly after the define line.

コントリビューターガイド