Skip to content

[Repo Assist] Split MarkdownTableParser.fs out of MarkdownBlockParser.fs#1075

Merged
dsyme merged 2 commits intomainfrom
repo-assist/fix-issue-1022-split-markdowntableparser-029a3ff14cab6b06
Mar 8, 2026
Merged

[Repo Assist] Split MarkdownTableParser.fs out of MarkdownBlockParser.fs#1075
dsyme merged 2 commits intomainfrom
repo-assist/fix-issue-1022-split-markdowntableparser-029a3ff14cab6b06

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Mar 8, 2026

🤖 This PR was created by Repo Assist, an automated AI assistant, in response to a /repo-assist continue please command from @dsyme on #1022.

Closes #1022 (partial progress — continuing the file-splitting series)


Summary

Extracts the pipe-table and Emacs-table parsing code from MarkdownBlockParser.fs into a new MarkdownTableParser.fs, reducing the block parser from 958 → 760 lines.

What was extracted into MarkdownTableParser.fs (196 lines)

Symbol Purpose
pipeTableFindSplits Splits a table-row char list at `
`( TableCellSeparator
`( PipeTableRow
`( PipeSeparatorRow
`( PipeTableBlock
`( EmacsTableLine
`( EmacsTableBlock

These patterns are a natural cohesive unit (table-parsing) with no dependency on any function defined earlier in MarkdownBlockParser.fs. MarkdownBlockParser now simply opens FSharp.Formatting.Markdown.TableParser to access PipeTableBlock and EmacsTableBlock.

Remaining large files (for follow-up)

File Lines Notes
BuildCommand.fs 2 506 PR #1072 open — wait for merge
YaafFSharpScripting.fs 1 123 Vendored — lower priority
SymbolReader.fs 1 330 Further splits possible
MarkdownBlockParser.fs 760 Reduced by this PR; natural split is harder now

Test Status

All 257 Markdown tests pass (dotnet test tests/FSharp.Markdown.Tests/ --configuration Release). Build is clean with 0 warnings.

Generated by Repo Assist for issue #1022 ·

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@8e6d7c86bba37371d2d0eee1a23563db3e561eb5

Extract pipe-table and emacs-table parsing active patterns into a
new MarkdownTableParser.fs (196 lines).  MarkdownBlockParser.fs
shrinks from 958 → 760 lines.  MarkdownBlockParser now opens
FSharp.Formatting.Markdown.TableParser to access PipeTableBlock and
EmacsTableBlock.

Part of #1022 (split large files).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dsyme dsyme marked this pull request as ready for review March 8, 2026 17:00
@dsyme dsyme merged commit c1437fd into main Mar 8, 2026
4 checks passed
@dsyme dsyme deleted the repo-assist/fix-issue-1022-split-markdowntableparser-029a3ff14cab6b06 branch March 8, 2026 17:00

### Refactored
* Split `MarkdownParser.fs` (1500 lines) into `MarkdownInlineParser.fs` (inline formatting) and `MarkdownParser.fs` (block-level parsing) for better maintainability. [#1022](https://github.com/fsprojects/FSharp.Formatting/issues/1022)
* Split pipe-table and Emacs-table parsing out of `MarkdownBlockParser.fs` into a new `MarkdownTableParser.fs` (196 lines), reducing `MarkdownBlockParser.fs` from 958 to 760 lines. [#1022](https://github.com/fsprojects/FSharp.Formatting/issues/1022)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick but I don't think this is worth communicating to end-users.

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.

Split large files across the repository

2 participants