mirror of
https://github.com/github/semantic.git
synced 2024-11-24 08:54:07 +03:00
Simplify effectivePath/Language
This commit is contained in:
parent
2315a27e8f
commit
c3b6e260cb
@ -89,10 +89,8 @@ diffBlobPair renderer blobs
|
||||
SExpressionDiffRenderer -> run ( parse parser >=> pure . fmap keepCategory) diffSyntaxTerms (const renderSExpressionDiff)
|
||||
|
||||
| otherwise = throwError (SomeException (NoParserForLanguage effectivePath effectiveLanguage))
|
||||
where (effectivePath, effectiveLanguage) = case blobs of
|
||||
This Blob { blobLanguage = Just lang, blobPath = path } -> (path, Just lang)
|
||||
That Blob { blobLanguage = Just lang, blobPath = path } -> (path, Just lang)
|
||||
These _ Blob { blobLanguage = lang, blobPath = path } -> (path, lang)
|
||||
where effectiveLanguage = languageForBlobPair blobs
|
||||
effectivePath = pathForBlobPair blobs
|
||||
|
||||
qualify language | OldToCDiffRenderer <- renderer = guard (language `elem` aLaCarteLanguages) *> Just language
|
||||
| otherwise = Just language
|
||||
|
Loading…
Reference in New Issue
Block a user