Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
farism committed Sep 10, 2023
1 parent 1873dd9 commit 4306ecc
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
5 changes: 2 additions & 3 deletions src/documentation_generator.cr
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ module Mint
def source(node)
@formatter.source(node)
end

def search(node)
"#{stringify(node)}|#{stringify(children(node))}".downcase
end
Expand All @@ -208,7 +208,7 @@ module Mint
""
end
end

def is_page_active(category : String, node : Ast::Node)
category == @category && stringify(node) == @page
end
Expand All @@ -229,7 +229,6 @@ module Mint
"#{page_url(child.category, child.parent)}##{child.name}"
end


def type_url(type : String)
core = @core_types.fetch(type, "")
own = @types.fetch(type, "")
Expand Down
4 changes: 2 additions & 2 deletions src/documentation_generator/enum_option.cr
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ module Mint
def comment(node : Ast::EnumOption)
render("#{__DIR__}/html/comment.ecr")
end

def stringify(node : Ast::EnumOption)
node.value.value
end
end
end
end
2 changes: 1 addition & 1 deletion src/documentation_generator/enum_record_definition.cr
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ module Mint
render("#{__DIR__}/html/enum_record_definition.ecr")
end
end
end
end
2 changes: 1 addition & 1 deletion src/documentation_generator/provider.cr
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ module Mint
def generate(node : Ast::Provider)
render("#{__DIR__}/html/provider.ecr")
end

def stringify(node : Ast::Provider)
node.name.value
end
Expand Down
2 changes: 1 addition & 1 deletion src/documentation_generator/store.cr
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module Mint

def children(node : Ast::Store)
children("stores", "state", node, node.states) |
children("stores", "function", node, node.functions)
children("stores", "function", node, node.functions)
end
end
end
2 changes: 1 addition & 1 deletion src/documentation_generator/type_variable.cr
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Mint
json.string node.value
end
end

class DocumentationGeneratorHtml
def generate(node : Ast::TypeVariable)
render("#{__DIR__}/html/type_variable.ecr")
Expand Down

0 comments on commit 4306ecc

Please sign in to comment.