Remove convert script
This commit is contained in:
parent
8b1bf02af8
commit
a7c3880c67
1 changed files with 0 additions and 30 deletions
|
@ -1,30 +0,0 @@
|
|||
|
||||
import Control.Arrow
|
||||
import Data.Foldable
|
||||
import Data.List
|
||||
import System.Environment
|
||||
|
||||
main = do
|
||||
files <- getArgs
|
||||
forM_ files $ \ file -> do
|
||||
convertM file
|
||||
|
||||
convertM :: FilePath -> IO ()
|
||||
convertM file = do
|
||||
contents <- readFile file
|
||||
seq (length contents) (return ())
|
||||
writeFile file (convert contents)
|
||||
|
||||
convert :: String -> String
|
||||
convert =
|
||||
lines >>>
|
||||
groupBy (\ a b -> take 1 a == take 1 b) >>>
|
||||
map go >>>
|
||||
concat >>>
|
||||
unlines
|
||||
where
|
||||
go :: [String] -> [String]
|
||||
go (a : r)
|
||||
| ">" `isPrefixOf` a
|
||||
= "``` haskell ignore" : map (drop 2) (a : r) ++ "```" : []
|
||||
go x = x
|
Loading…
Reference in a new issue