This PR fixes an issue where header nesting levels were properly tracked between, but not within, moduledocs.
58 lines
699 B
Text
58 lines
699 B
Text
set_option doc.verso true
|
|
|
|
/-!
|
|
This test checks that header nesting rules are enforced within and across Verso module docs.
|
|
|
|
First, within.
|
|
|
|
# A
|
|
## B
|
|
### C
|
|
-/
|
|
|
|
|
|
/-- error: Incorrect header nesting: expected at most `###` but got `####` -/
|
|
#guard_msgs in
|
|
/-!
|
|
# A
|
|
## B
|
|
#### C
|
|
-/
|
|
|
|
/-- error: Incorrect header nesting: expected at most `##` but got `###` -/
|
|
#guard_msgs in
|
|
/-!
|
|
# A
|
|
## B
|
|
### C
|
|
#### D
|
|
# E
|
|
### F
|
|
-/
|
|
|
|
/-!
|
|
Now, check between blocks.
|
|
|
|
# A
|
|
## B
|
|
-/
|
|
|
|
/-!
|
|
### C
|
|
-/
|
|
|
|
/-- error: Incorrect header nesting: expected at most `####` but got `#####` -/
|
|
#guard_msgs in
|
|
/-!
|
|
##### D
|
|
-/
|
|
|
|
/-!
|
|
# A
|
|
-/
|
|
|
|
/-- error: Incorrect header nesting: expected at most `##` but got `#####` -/
|
|
#guard_msgs in
|
|
/-!
|
|
##### B
|
|
-/
|