Skip to content

Commit 324e861

Browse files
committed
style: use camelCase; rename expos to e, since we will possibly never add new markers
1 parent 3150029 commit 324e861

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/plugins/expressive-code/cxx-mark.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function pluginCxxMark(): ExpressiveCodePlugin {
2929
})
3030
);
3131
line.editText(begin, end, match[0].slice(5, -2));
32-
} else if (match[1].startsWith("expos:")) {
32+
} else if (match[1].startsWith("e:")) {
3333
line.addAnnotation(
3434
new InlineStyleAnnotation({
3535
inlineRange: {
@@ -40,15 +40,15 @@ export function pluginCxxMark(): ExpressiveCodePlugin {
4040
italic: true,
4141
})
4242
);
43-
line.editText(begin + 2, begin + 9, "");
43+
line.editText(begin + 2, begin + 5, "");
4444
} else if (match[1] == "opt") {
45-
const new_str = "(optional)";
46-
line.editText(begin, end, new_str);
45+
const newStr = "(optional)";
46+
line.editText(begin, end, newStr);
4747
line.addAnnotation(
4848
new InlineStyleAnnotation({
4949
inlineRange: {
5050
columnStart: begin,
51-
columnEnd: begin + new_str.length,
51+
columnEnd: begin + newStr.length,
5252
},
5353
color: "var(--cppdoc-color-cxx-mark-optional)",
5454
})

0 commit comments

Comments
 (0)