[Repo Assist] Remove duplicate LookupKey active patterns from HtmlFormatting.fs and LatexFormatting.fs#1069
Draft
github-actions[bot] wants to merge 2 commits intomainfrom
Conversation
… 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>
7 tasks
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.
Summary
Both
HtmlFormatting.fsandLatexFormatting.fsdefined their ownLookupKeyactive pattern, which is identical to the one already defined inMarkdownUtils. Since both files alreadyopen MarkdownUtils, the local definitions shadowed the one fromMarkdownUtilsunnecessarily.This PR removes the duplicate definitions, letting the
MarkdownUtils.LookupKeypattern 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 fromMarkdownUtils(alreadyopened) 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 Release— succeeded (0 errors)✅ Tests:
dotnet test tests/FSharp.Markdown.Tests— 257/257 passed