Skip to content

Commit 81e450f

Browse files
authored
enh(cpp) add flat_map and flat_set c++23 new features (highlightjs#4127)
1 parent ff3985d commit 81e450f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGES.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ Core Grammars:
2121
- fix(typescript) - Fixedoptional property not highlighted correctly [Dxuian]
2222
- fix(ruby) - fix `|=` operator false positives (as block arguments) [Aboobacker MK]
2323
- fix(sql) - Fixed sql primary key and foreign key spacing issue [Dxuian]
24-
24+
- fix(cpp) added flat_set and flat_map as a part of cpp 23 version [Lavan]
25+
2526
New Grammars:
2627

2728
- added 3rd party TTCN-3 grammar to SUPPORTED_LANGUAGES [Osmocom][]
@@ -53,6 +54,7 @@ CONTRIBUTORS
5354
[Sainan]: https://github.com/Sainan
5455
[Osmocom]: https://github.com/osmocom
5556
[Álvaro Mondéjar]: https://github.com/mondeja
57+
[Lavan]: https://github.com/jvlavan
5658

5759

5860
## Version 11.10.0

src/languages/cpp.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@ export default function(hljs) {
247247
'counting_semaphore',
248248
'deque',
249249
'false_type',
250+
'flat_map',
251+
'flat_set',
250252
'future',
251253
'imaginary',
252254
'initializer_list',
@@ -572,7 +574,7 @@ export default function(hljs) {
572574
[
573575
PREPROCESSOR,
574576
{ // containers: ie, `vector <int> rooms (9);`
575-
begin: '\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function)\\s*<(?!<)',
577+
begin: '\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)',
576578
end: '>',
577579
keywords: CPP_KEYWORDS,
578580
contains: [

0 commit comments

Comments
 (0)