Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

* Speedup by pattern matching, we only are able to parse includes tha…

…t start on

  column 0
  • Loading branch information...
commit 745ea703f7d990aaa31a2505a08bdb5c177189b4 1 parent 619d3df
@spockz spockz authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  src/LiterateHighlighter.hs
View
3  src/LiterateHighlighter.hs
@@ -69,7 +69,8 @@ discoverFiles fp = do contents <- fmap (\xs -> [base ++ x | Just x <- map runPI
base = takeDirectory fp ++ "/"
-runPInclude = runParse pInclude
+runPInclude xs@('%':_) = runParse pInclude xs
+runPInclude _ = Nothing
runParse :: Show t => Parser t -> String -> Maybe t
runParse p inp = let r@(a, errors) = PCC.parse ( (,) <$> p <*> pEnd)
Please sign in to comment.
Something went wrong with that request. Please try again.