Skip to content

Commit b3cd652

Browse files
authored
Add PANEL macro (#3670)
Use it for AssertExpression docs to group 'implementation defined' paragraphs together.
1 parent 59a4167 commit b3cd652

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

css/style.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2157,3 +2157,13 @@ dt.d_decl:hover .decl_anchor {
21572157
margin-bottom: 1em;
21582158
padding-top: 0.5em;
21592159
}
2160+
2161+
/* Group related info together */
2162+
.panel
2163+
{
2164+
padding: 0.3em 0.6em;
2165+
border-radius: 5px;
2166+
background-color: #F5F5F5;
2167+
border: 1px solid #E6E6E6;
2168+
}
2169+

dlang.org.ddoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,8 @@ $(DIVID tools, $(DIV,
337337
))
338338
_=
339339

340+
_=Group related info together
341+
PANEL=$(DIVC panel, $0)
340342
PC=$(TC p, $1, $+)
341343
_=
342344

spec/expression.dd

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2421,6 +2421,7 @@ $(GNAME AssertArguments):
24212421
$(UNDEFINED_BEHAVIOR Once in an $(I Invalid State) the behavior of the continuing execution
24222422
of the program is undefined.)
24232423

2424+
$(PANEL
24242425
$(IMPLEMENTATION_DEFINED Whether the first $(I AssertExpression) is evaluated
24252426
or not (at runtime) is typically set with a compiler switch. If it is not evaluated,
24262427
any side effects specified by the $(I AssertExpression) may not occur.
@@ -2435,7 +2436,7 @@ $(GNAME AssertArguments):
24352436
)
24362437
)
24372438

2438-
$(NOTE $(D AssertError) is the default for $(B dmd), with an optional
2439+
$(NOTE Throwing $(D AssertError) is the default for $(B dmd), with an optional
24392440
$(DDSUBLINK dmd, switch-checkaction, $(B -checkaction=context))
24402441
switch to show certain sub-expressions used in the first *AssertExpression*
24412442
in the error message:)
@@ -2444,7 +2445,8 @@ $(GNAME AssertArguments):
24442445
auto x = 4;
24452446
assert(x < 3);
24462447
---
2447-
$(P When in use, the above will throw an `AssertError` with a message `4 >= 3`.)
2448+
When in use, the above will throw an `AssertError` with a message `4 >= 3`.
2449+
)
24482450

24492451
$(BEST_PRACTICE
24502452
$(OL

0 commit comments

Comments
 (0)