Skip to content

[Repo Assist] Improve markdown API docs: section-based member layout instead of tables#1026

Open
github-actions[bot] wants to merge 7 commits intomainfrom
repo-assist/fix-725-cleaner-markdown-apidocs-0454594620717e94
Open

[Repo Assist] Improve markdown API docs: section-based member layout instead of tables#1026
github-actions[bot] wants to merge 7 commits intomainfrom
repo-assist/fix-725-cleaner-markdown-apidocs-0454594620717e94

Conversation

@github-actions
Copy link
Contributor

🤖 This is an automated PR from Repo Assist.

Problem

Markdown output for API docs (issue #725) was very messy because member documentation was rendered in a 3-column Markdown table. Markdown tables can't contain block-level content, so everything was crammed into cells using HTML hacks:

  • <br /> to separate sections within a description cell
  • | to escape | characters in operator/union signatures
  • <br /> within examples, notes, and return-type docs
  • Code examples with full syntax-highlight HTML embedded in a single table cell

Before (fslib-nested.md):

Function or value | Description | Source
:--- | :--- | :---:
[`f x`](#f) | This function returns a [FsLib.Nested.MyType] multiplied by 2.<br /> You will notice that `FsLib.Nested.MyType` is just an `int`<br /><br />Parameters<br /><br />**x**: `int`<br /><br />Returns: `MyType`<br /> |  

After:

(a name="f")(/a)

#### `f x`

This function returns a [FsLib.Nested.MyType] multiplied by 2.
 You will notice that `FsLib.Nested.MyType` is just an `int`

**Parameters:**

**x**: `int`

Returns: `MyType`
```

Code examples with syntax highlighting are also dramatically improved, no longer constrained inside a single table cell:

**Before** (`fslib-commentexamples.md`):
```
[`attribInCodeExample ()`](#attribInCodeExample) | AAA<br /><br />Parameters<br /><br />**()**: `unit`<br /><br />Example<br /><pre class="fssnip highlighted"><code ...onmouseover=...>...</code></pre>(div class="fsdocs-tip")...(/div)<br /> |  

After:

(a name="attribInCodeExample")(/a)

#### `attribInCodeExample ()`

AAA

**Parameters:**

**()**: `unit`

##### Example

<pre class="fssnip highlighted"><code ...>...</code></pre>
(div class="fsdocs-tip" id="fs1")...(/div)

Change

renderMembers in GenerateMarkdown.fs now generates per-member #### sections instead of table rows:

  • HTML anchor (a name="...")(/a) before each member heading for backward-compatible #MemberName links
  • #### heading with the full usage signature (HTML)
  • Properly separated paragraphs for summary, remarks, parameters, return type, notes, and examples
  • Source link as a standalone paragraph

The entities summary table (types/modules list in namespace pages) is unchanged — that content is single-line and benefits from the compact table layout.

embedSafe (which added <br />/| escaping) is replaced with embed throughout renderMembers since we're no longer inside table cells.

Remaining HTML

Some HTML still appears in the output and would require further work:

  • in member signatures (from codeHtml in GenerateModel.fs)
  • <code><span> wrapping in member headings (from UsageHtml)
  • <p> tags in inline-mode summaries (from the HTML-based XML doc pipeline)
  • onmouseover/(div class="fsdocs-tip") tooltip elements in syntax-highlighted examples

These are separate from this PR's scope.

Test Status

✅ All 69 ApiDocs tests pass. No tests were changed; all existing assertions are satisfied by the new section-based output.

Generated by Repo Assist for issue #725

To install this workflow, run gh aw add githubnext/agentics/workflows/repo-assist.md@f2c5cf1e4af58e09a93ba0703c6bf084711b265f. View source at https://github.com/githubnext/agentics/tree/f2c5cf1e4af58e09a93ba0703c6bf084711b265f/workflows/repo-assist.md.

Replace the 3-column Markdown table in renderMembers with per-member
section headings (####). This eliminates:
- <br /> separators crammed into table cells
- &#124; pipe-character escaping for operators/unions
- constrained layout for multi-line content and code examples

Each member now gets an HTML anchor (<a name="..."></a>) for backward-
compatible per-member links, followed by a #### heading with the usage
signature, then properly separated paragraphs for summary, parameters,
return type, notes, and examples.

The entities summary table (types/modules list) is unchanged.

All 69 existing tests pass.

Closes #725

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dsyme dsyme marked this pull request as ready for review February 26, 2026 00:18
@dsyme
Copy link
Contributor

dsyme commented Feb 26, 2026

/repo-assist add some tests to this

Test coverage for issue #725 fix:
- Section headings (####) instead of table rows
- HTML anchors for backward-compatible member links
- ##### Example / Note headings
- **Parameters:** section for members with parameters
- No embedded <br /> in member descriptions

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Contributor Author

Commit pushed: 73ef401

Generated by Repo Assist

@github-actions
Copy link
Contributor Author

🤖 This is an automated response from Repo Assist.

I've added three new tests to ApiDocsTests.fs covering the section-based Markdown layout introduced by this PR:

  1. ApiDocs Markdown uses section-based member layout instead of tables — verifies that #### headings are used for members, that HTML anchors ((a name="...")) are generated for backward-compatible links, and that the old table header format no longer appears.

  2. ApiDocs Markdown generates Example and Note section headings — verifies that (example) XML doc tags produce ##### Example headings instead of inline Example<br/> embedded text.

  3. ApiDocs Markdown generates Parameters section for members with parameters — verifies that members with parameters produce a **Parameters:** section with individually listed parameter entries.

All 25 tests pass locally on this branch.

Generated by Repo Assist for issue #1026

To install this workflow, run gh aw add githubnext/agentics/workflows/repo-assist.md@f2c5cf1e4af58e09a93ba0703c6bf084711b265f. View source at https://github.com/githubnext/agentics/tree/f2c5cf1e4af58e09a93ba0703c6bf084711b265f/workflows/repo-assist.md.

@nojaf
Copy link
Collaborator

nojaf commented Feb 26, 2026

/repo-assist remove parameter _tableHeader and update all callers

…rkdown.fs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Contributor Author

Commit pushed: 5e3c3c2

Generated by Repo Assist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cleaner markdown output for API docs

2 participants