Skip to content

Commit d0ff9ea

Browse files
committed
update documentation comments
1 parent 287d51d commit d0ff9ea

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/maintenance/documentation-comments.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ The main context contains the primary content of the documentation. It includes
1818

1919
### Lists
2020

21-
Lists can only be used in the main context and cannot have sub-lists. Any type of list always appears in the main context. A list item is defined by the `-` character (ASCII code 45) and accepts a single line of content. Any new line signifies the end of a list item.
21+
Lists can only be used in the main context and cannot have sub-lists. Any type of list always appears in the main context. Lists start with `-` (ASCII 45) or with numbers (for example `123.`, `42.`) and accepts a single line of content by default.
2222

23-
If you do not want to move to a new line and end the list item, end the previous line with a comma ",". In this case, following line is considered part of the previous list item. But a new list mark (it is `-`) appears, it starts a new list item context. Indentation will not break the list item handling, so you can any space to align comment.
23+
If you do not want to move to a new line and end the list item, the next line must be indented properly to continue to the list's content. In this case, following line is considered part of the previous list item. But a new list mark (it is `-` or numeric pattern described above) appears, it starts a new list item context. Indentation will not break the list item handling, so you can any space or tabs to align comment.
2424

2525
::: info
2626
With indentation, you might make it appear as if it's part of a sub-scope or sub-list. However, juledoc does not evaluate it this way. If the list is within the main scope, it is treated as a list. If it is inside a sub-scope, it is treated as part of the text within that sub-scope.
@@ -55,14 +55,19 @@ Here is an example documentation that uses all context types as described:
5555
//
5656
// This is a subscope because it uses tab for indentation.
5757
// This is a subscope for a previous subscope because it uses 2 tab.
58-
// - Looks like-list item but juledoc handles as a text in this subscope.
58+
// - Looks like list-item but juledoc handles as a text in this subscope.
5959
// - Looks like list-item but juledoc handles as a text in this subscope.
6060
//
6161
//- This is a list item.
6262
// - This is a list item.
6363
// - This is a list item,
64-
// And this line is a part of the previous list item,
65-
// and this is too. Because lines ends with comma.
64+
// And this line is a part of the previous list item.
65+
// This is not a part of the list item.
66+
//
67+
// 1. This is a numerated list item.
68+
// 2. This is a second numerated list item.
69+
// And this line is a part of the previous list item.
70+
// And this is too, event it is tab indented.
6671
```
6772

6873
Documentation must always come before the definition it belongs to, and any spaces or invalid comments (such as range comments) will break the documentation sequence. Therefore, using a separator for spaces is recommended.

0 commit comments

Comments
 (0)