Skip to content

Commit

Permalink
Expose 'aliased_html' in doc JSON (#10117)
Browse files Browse the repository at this point in the history
This can be useful for external doc generators, to detect where Crystal decides to linkify types and such.
  • Loading branch information
oprypin authored Jan 6, 2021
1 parent 0f34df2 commit 554400b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/compiler/crystal/tools/doc/type.cr
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,8 @@ class Crystal::Doc::Type
builder.field "program", program?
builder.field "enum", enum?
builder.field "alias", alias?
builder.field "aliased", alias_definition.to_s
builder.field "aliased", alias? ? alias_definition.to_s : nil
builder.field "aliased_html", alias? ? formatted_alias_definition : nil
builder.field "const", const?
builder.field "constants", constants
builder.field "included_modules" do
Expand Down

0 comments on commit 554400b

Please sign in to comment.