Skip to content

Commit beffc40

Browse files
committed
Clarify lion comment placement and consolidate tk events docs
1 parent 0ae1ae2 commit beffc40

23 files changed

Lines changed: 56 additions & 203 deletions

lion/internal/extractor/extractor.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,14 @@ type DocEntry struct {
2323
HasSection bool
2424
}
2525

26+
//lion:implementation section="Extraction pipeline"
2627
// Extraction pipeline:
2728
// - Walks all .go files under the directory, skipping *_test.go.
2829
// - Parses with comments and pulls lion markers from package doc, func doc, type/const/var
2930
// doc comments, and inline comments inside functions and other declarations (first name in a
3031
// const/var block is used as the entity).
3132
// - Supports single-line markers and block comment markers (marker at top of the doc block).
3233
// - Aggregates snippets per topic across files; generator writes one file per topic.
33-
//
34-
//lion:implementation section="Extraction pipeline"
3534
func Extract(dir string) (map[string][]DocEntry, error) {
3635
docs := make(map[string][]DocEntry)
3736
fset := token.NewFileSet()
@@ -157,6 +156,7 @@ func determineEntityForComment(cg *ast.CommentGroup, file *ast.File, funcDecls [
157156
return "package " + file.Name.Name
158157
}
159158

159+
//lion:supported-syntax section="Supported syntax"
160160
// Supported syntax formats:
161161
//
162162
// 1. Single-line marker first:
@@ -174,9 +174,6 @@ func determineEntityForComment(cg *ast.CommentGroup, file *ast.File, funcDecls [
174174
// - Unknown keys stop metadata parsing and are treated as content.
175175
//
176176
// All formats attach documentation to the next declaration (function, type, const, var).
177-
//
178-
//lion:supported-syntax section="Supported syntax"
179-
//lion:supported-syntax section="Supported syntax"
180177
func extractFromCommentGroup(fset *token.FileSet, cg *ast.CommentGroup, filepath, entityName string, docs map[string][]DocEntry) error {
181178
topicGroups := make(map[string][]string)
182179
topicOrder := []string{}

tk/docs/event.project.alias.add.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

tk/docs/event.project.alias.remove.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

tk/docs/event.project.created.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

tk/docs/event.project.delete.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

tk/docs/event.project.name.set.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

tk/docs/event.relation.add.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

tk/docs/event.relation.note.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

tk/docs/event.relation.remove.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

tk/docs/event.task.attachment.add.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)