mirror of
https://github.com/github/semantic.git
synced 2024-12-22 22:31:36 +03:00
Combine the code paths for patch diffs of à la carte terms.
This commit is contained in:
parent
0c5b268530
commit
79395e9af3
@ -98,12 +98,9 @@ diffBlobPair renderer blobs = case (renderer, effectiveLanguage) of
|
|||||||
| Just syntaxParser <- lang >>= syntaxParserForLanguage ->
|
| Just syntaxParser <- lang >>= syntaxParserForLanguage ->
|
||||||
run (decorate syntaxIdentifierAlgebra <=< parse syntaxParser) diffSyntaxTerms (renderJSONDiff blobs)
|
run (decorate syntaxIdentifierAlgebra <=< parse syntaxParser) diffSyntaxTerms (renderJSONDiff blobs)
|
||||||
|
|
||||||
(PatchDiffRenderer, Just Language.JSON) -> run (parse jsonParser) diffTerms (renderPatch blobs)
|
|
||||||
(PatchDiffRenderer, Just Language.Markdown) -> run (parse markdownParser) diffTerms (renderPatch blobs)
|
|
||||||
(PatchDiffRenderer, Just Language.Python) -> run (parse pythonParser) diffTerms (renderPatch blobs)
|
|
||||||
(PatchDiffRenderer, Just Language.Ruby) -> run (parse rubyParser) diffTerms (renderPatch blobs)
|
|
||||||
(PatchDiffRenderer, Just Language.TypeScript) -> run (parse typescriptParser) diffTerms (renderPatch blobs)
|
|
||||||
(PatchDiffRenderer, lang)
|
(PatchDiffRenderer, lang)
|
||||||
|
| Just (SomeParser parser) <- lang >>= someParser (Proxy :: Proxy '[Diffable, Eq1, Foldable, Functor, GAlign, Show1, Traversable]) ->
|
||||||
|
run (parse parser) diffTerms (renderPatch blobs)
|
||||||
| Just syntaxParser <- lang >>= syntaxParserForLanguage ->
|
| Just syntaxParser <- lang >>= syntaxParserForLanguage ->
|
||||||
run (parse syntaxParser) diffSyntaxTerms (renderPatch blobs)
|
run (parse syntaxParser) diffSyntaxTerms (renderPatch blobs)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user