Skip to content

Commit

Permalink
Fix bug in documentation generation (#4502)
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanTAllen authored Mar 26, 2024
1 parent 30b02e2 commit ef15a30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .release-notes/bad-doc-gen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Fix incorrect markdown formatting for types from documentation generation

Previously, we were incorrectly creating field types in markdown documentation. The markdown for the type should have been on a single line but for long union types, it would end up crossing lines. That resulted in broken markdown that wouldn't display correctly.
2 changes: 1 addition & 1 deletion src/libponyc/pass/docgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ static void doc_fields(docgen_t* docgen, docgen_opt_t* docgen_opt,
}

fprintf(docgen->type_file, "### %s %s: ", ftype, name);
doc_type(docgen, docgen_opt, type, true, true);
doc_type(docgen, docgen_opt, type, true, false);
add_source_code_link(docgen, field);
fprintf(docgen->type_file, "\n");

Expand Down

0 comments on commit ef15a30

Please sign in to comment.