diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a99043ff..c0a1b602e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,9 @@ ##### Bug Fixes -* None. +* Fix missing doc comments on some extensions. + [John Fairhurst](https://github.com/johnfairh) + [#454](https://github.com/realm/jazzy/issues/454) ## 0.8.2 diff --git a/lib/jazzy/sourcekitten.rb b/lib/jazzy/sourcekitten.rb index 66f2fe2c5..fad0ab862 100644 --- a/lib/jazzy/sourcekitten.rb +++ b/lib/jazzy/sourcekitten.rb @@ -47,7 +47,7 @@ def autolink_block(doc_url, middle_regex, after_highlight) module Jazzy # This module interacts with the sourcekitten command-line executable module SourceKitten - @default_abstract = Markdown.render('Undocumented').freeze + @undocumented_abstract = Markdown.render('Undocumented').freeze # Group root-level docs by custom categories (if any) and type def self.group_docs(docs) @@ -222,7 +222,7 @@ def self.make_default_doc_info(declaration) # @todo: Fix these declaration.line = nil declaration.column = nil - declaration.abstract = @default_abstract + declaration.abstract = '' declaration.parameters = [] declaration.children = [] end @@ -276,13 +276,20 @@ def self.should_mark_undocumented(kind, filepath) end def self.process_undocumented_token(doc, declaration) + make_default_doc_info(declaration) + filepath = doc['key.filepath'] objc = Config.instance.objc_mode if objc || should_mark_undocumented(doc['key.kind'], filepath) @stats.add_undocumented(declaration) + declaration.abstract = @undocumented_abstract + else + comment = doc['key.doc.comment'] + declaration.abstract = Markdown.render(comment) if comment end + return nil if !documented_child?(doc) && @skip_undocumented - make_default_doc_info(declaration) + declaration end def self.parameters(doc, discovered) diff --git a/spec/integration_specs b/spec/integration_specs index 9b08b61b6..0f7fc77ce 160000 --- a/spec/integration_specs +++ b/spec/integration_specs @@ -1 +1 @@ -Subproject commit 9b08b61b6fa9c4ebcc288c93aeb77677d367dae8 +Subproject commit 0f7fc77ced62e114133761150a38907d50eee955