Skip to content

[Repo Assist] Remove duplicate LookupKey active patterns from HtmlFormatting.fs and LatexFormatting.fs#1069

Draft
github-actions[bot] wants to merge 2 commits intomainfrom
repo-assist/improve-remove-duplicate-lookupkey-2026-03-07-f75969e17782c393
Draft

[Repo Assist] Remove duplicate LookupKey active patterns from HtmlFormatting.fs and LatexFormatting.fs#1069
github-actions[bot] wants to merge 2 commits intomainfrom
repo-assist/improve-remove-duplicate-lookupkey-2026-03-07-f75969e17782c393

Conversation

@github-actions
Copy link
Contributor

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

🤖 This PR was created by Repo Assist, an automated AI assistant.

Summary

Both HtmlFormatting.fs and LatexFormatting.fs defined their own LookupKey active pattern, which is identical to the one already defined in MarkdownUtils. Since both files already open MarkdownUtils, the local definitions shadowed the one from MarkdownUtils unnecessarily.

This PR removes the duplicate definitions, letting the MarkdownUtils.LookupKey pattern be used directly — reducing duplication and making the codebase easier to maintain.

Changes

  • HtmlFormatting.fs: Removed the local (|LookupKey|_|) definition (lines 28–35 in original). The pattern from MarkdownUtils (already opened) is used instead.
  • LatexFormatting.fs: Removed the local (|LookupKey|_|) definition (lines 36–43 in original). Same reasoning.

No functional change — all three variants were identical.

Test Status

✅ Build: dotnet build FSharp.Formatting.sln --configuration Releasesucceeded (0 errors)
✅ Tests: dotnet test tests/FSharp.Markdown.Tests257/257 passed

Generated by Repo Assist ·

To install this agentic workflow, run

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

… LatexFormatting.fs

Both files open MarkdownUtils, which already defines the identical LookupKey
pattern. The local redefinitions in HtmlFormatting.fs and LatexFormatting.fs
are exact duplicates and simply shadow the one from MarkdownUtils.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

0 participants