[Repo Assist] Split MarkdownParser.fs into inline and block-level parsers#1052
Open
github-actions[bot] wants to merge 4 commits intomainfrom
Open
[Repo Assist] Split MarkdownParser.fs into inline and block-level parsers#1052github-actions[bot] wants to merge 4 commits intomainfrom
github-actions[bot] wants to merge 4 commits intomainfrom
Conversation
…er.fs Split the 1500-line MarkdownParser.fs into two focused files: - MarkdownInlineParser.fs: inline formatting (spans, chars, emphasis, links, ParsingContext type, parseChars, parseSpans) - MarkdownParser.fs: block-level parsing (headings, lists, tables, blockquotes, parseParagraphs) All 257 markdown tests pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
/repo-assist you should actually be deleting MarkdownParser.fs shouldn't you? |
…BlockParser Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
Commit pushed:
|
Contributor
Author
|
🤖 This is an automated response from Repo Assist. Good catch, I've pushed a follow-up commit that:
The build still succeeds with 0 warnings/errors.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This PR was created by Repo Assist, an automated AI assistant.
Closes #1022 (partial — continuing file-splitting work)
Summary
Split the 1500-line
MarkdownParser.fsinto two focused, cohesive files:MarkdownInlineParser.fsInlineParsermodule — inline formatting: active patterns for emphasis/links/entities,ParsingContexttype,parseChars,parseSpansMarkdownParser.fsParsermodule — block-level parsing: headings, lists, tables, blockquotes, code blocks,parseParagraphsRoot Cause / Rationale
MarkdownParser.fsmixed two distinct parsing concerns: inline span parsing (characters, emphasis, links) and block-level paragraph parsing. The natural break is at the section comment "Parsing of Markdown - second part handles paragraph-level formatting".Changes
src/FSharp.Formatting.Markdown/MarkdownInlineParser.fs—module internal FSharp.Formatting.Markdown.InlineParsersrc/FSharp.Formatting.Markdown/MarkdownParser.fs— nowmodule internal FSharp.Formatting.Markdown.Parser, opensInlineParsersrc/FSharp.Formatting.Markdown/Markdown.fs— also opensInlineParserto accessParsingContextFSharp.Formatting.Markdown.fsproj—MarkdownInlineParser.fsadded beforeMarkdownParser.fsRELEASE_NOTES.mdNote
This avoids all files currently modified in open PRs (#1019:
BuildCommand.fs,Literate.fs,Program.fs; #1045:SymbolReader.fs,ApiDocTypes.fs,GenerateHtml.fsetc.), per maintainer guidance.Test Status
✅ All 257 markdown tests pass (
dotnet test FSharp.Markdown.Tests).✅ Fantomas formatting: no changes needed.
✅ Build:
dotnet buildsucceeded with 0 warnings, 0 errors.