Skip to content

Commit 969c325

Browse files
committed
escape escape brackets in attribute lists
#fix fix #851
1 parent 190786b commit 969c325

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

share/mrdocs/addons/generator/common/partials/symbol/signature/field.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{#if attributes}}[[{{join ", " attributes}}]]
1+
{{#if attributes}}{{ str "[[" }}{{join ", " attributes}}{{ str "]]" }}
22
{{/if}}
33
{{#if isMutable}}mutable
44
{{/if~}}

share/mrdocs/addons/generator/common/partials/symbol/signature/function.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{{/if~}}
33
{{#if isFriend}}friend
44
{{/if~}}
5-
{{#if attributes}}{{#unless isFriend}}[[{{join ", " attributes}}]]
5+
{{#if attributes}}{{#unless isFriend}}{{ str "[[" }}{{join ", " attributes}}{{ str "]]" }}
66
{{/unless}}{{/if~}}
77
{{#if constexprKind}}{{constexprKind}}
88
{{/if~}}

test-files/golden-tests/metadata/attributes-2.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Declared in `<attributes‐2.cpp>`
2626
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
2727
----
2828
template<class T>
29-
[[nodiscard]]
29+
[[nodiscard]]
3030
int
3131
f();
3232
----

test-files/golden-tests/metadata/attributes_1.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Declared in `<attributes_1.cpp>`
2525

2626
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
2727
----
28-
[[nodiscard]]
28+
[[nodiscard]]
2929
bool
3030
f();
3131
----

test-files/golden-tests/metadata/no_unique_address.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Declared in `<no_unique_address.cpp>`
6969

7070
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
7171
----
72-
[[deprecated, maybe_unused]]
72+
[[deprecated, maybe_unused]]
7373
<<Empty,Empty>> e = Empty&lcub;&rcub;;
7474
----
7575

test-files/golden-tests/metadata/noreturn.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Declared in `&lt;noreturn&period;cpp&gt;`
7474

7575
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
7676
----
77-
[[noreturn]]
77+
&lsqb;&lsqb;noreturn&rsqb;&rsqb;
7878
static
7979
void
8080
f2();
@@ -91,7 +91,7 @@ Declared in `&lt;noreturn&period;cpp&gt;`
9191

9292
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
9393
----
94-
[[noreturn]]
94+
&lsqb;&lsqb;noreturn&rsqb;&rsqb;
9595
void
9696
f3();
9797
----
@@ -123,7 +123,7 @@ Declared in `&lt;noreturn&period;cpp&gt;`
123123

124124
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
125125
----
126-
[[noreturn]]
126+
&lsqb;&lsqb;noreturn&rsqb;&rsqb;
127127
void
128128
f1();
129129
----

test-files/golden-tests/snippets/terminate.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Declared in `&lt;terminate&period;cpp&gt;`
2929

3030
[source,cpp,subs="verbatim,replacements,macros,-callouts"]
3131
----
32-
[[noreturn]]
32+
&lsqb;&lsqb;noreturn&rsqb;&rsqb;
3333
void
3434
terminate() noexcept;
3535
----

0 commit comments

Comments
 (0)