module Language.Drasil.Plain.Helpers where

import Data.String.Utils (replace)

toPlainName :: String -> String
toPlainName s =
    let illegalChars = [
            ",","~","`","-","=","!","@","#","$","%","^","&","*","(",")","+",
            "[","]","\\",";","'","/","|",":","\"","<",">","?"," "]
    in foldl varNameReplace s illegalChars
    where  varNameReplace :: String -> String -> String
           varNameReplace l old = replace old "_" l
module Language.Drasil.Plain.Helpers where

import Data.String.Utils (replace)

toPlainName :: String -> String
toPlainName s =
    let illegalChars = [
            ",","~","`","-","=","!","@","#","$","%","^","&","*","+",
            "[","]","\\",";","'","/","|","\"","<",">","?"," "]
    in foldl varNameReplace s illegalChars
    where  varNameReplace :: String -> String -> String
           varNameReplace l old = replace old "_" l
Fix overzealous character replacement in function names
Fix overzealous character replacement in function names
