You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lion/README.md
+32-4Lines changed: 32 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,9 +55,20 @@ The tool generates:
55
55
56
56
## Comment Format
57
57
58
-
lion supports two comment formats:
58
+
lion supports three comment formats:
59
59
60
-
### Single-line format
60
+
### 1. Marker at end (cleanest for multi-line)
61
+
62
+
```go
63
+
// Regular Go comment describing functionality.
64
+
// Multiple lines without any lion prefix.
65
+
// The marker at the end pulls in all preceding lines.
66
+
//lion:topic-name
67
+
```
68
+
69
+
This is the **recommended format** for longer documentation blocks. It keeps your comments clean and readable - just regular Go comments with a single lion marker at the end.
70
+
71
+
### 2. Single-line format
61
72
62
73
```
63
74
//lion:topic-name Optional content describing this code element
@@ -67,7 +78,7 @@ lion supports two comment formats:
67
78
-**Content**: Optional markdown-formatted text
68
79
- Multiple consecutive `//lion:topic` lines are combined into one entry
69
80
70
-
### Block comment format
81
+
### 3. Block comment format
71
82
72
83
```go
73
84
/*lion:topic-name
@@ -81,10 +92,27 @@ This makes documentation cleaner.
81
92
-**Content**: All subsequent lines in the block comment
82
93
- Cleaner for longer documentation blocks
83
94
84
-
Both formats can be attached to functions, types, constants, variables, and package declarations.
95
+
All formats can be attached to functions, types, constants, variables, and package declarations.
85
96
86
97
## Example
87
98
99
+
Marker at end format (recommended):
100
+
101
+
```go
102
+
// lion is a documentation extraction tool.
103
+
// Add lion comments to generate markdown docs.
104
+
// This is the cleanest syntax for multi-line docs.
0 commit comments