Copyright | (c) Stefan Berthold 2014-2015 |
---|---|
License | BSD3-style (see LICENSE) |
Maintainer | stefan.berthold@gmx.net |
Stability | unstable |
Portability | GHC |
Safe Haskell | None |
Language | Haskell2010 |
This module specifies the default configuration values for SmallCaps.
- data ParserState = ParserState {}
- defaultProfile :: Map Text Config
- data Config = Config {
- periodChars :: [Char]
- search :: LaTeXElement -> Bool
- isolate :: LaTeXElement -> Maybe Text
- skip :: LaTeXElement -> Bool
- unskip :: LaTeXElement -> Bool
- eos :: LaTeXElement -> Bool
- replace :: StopState -> Text -> Text
- replaceFilter :: Text -> Bool
- exceptions :: [PatternReplace]
- inlineConfig :: Bool
- defaultPeriodChars :: [Char]
- defaultSearch :: LaTeXElement -> Bool
- defaultIsolate :: LaTeXElement -> Maybe Text
- defaultSkip :: LaTeXElement -> Bool
- defaultUnskip :: LaTeXElement -> Bool
- defaultEos :: LaTeXElement -> Bool
- defaultReplace :: StopState -> Text -> Text
- defaultReplaceTemplate :: Text -> StopState -> Text -> Text
- defaultReplaceTemplate' :: Text -> StopState -> Text -> Text
- defaultNewSentence :: (Text -> Text) -> StopState -> Text -> Text
- defaultReplaceFilter :: Text -> Bool
- defaultExceptions :: [PatternReplace]
- (&&&) :: (LaTeXElement -> Bool) -> (LaTeXElement -> Bool) -> LaTeXElement -> Bool
- (|||) :: (LaTeXElement -> Bool) -> (LaTeXElement -> Bool) -> LaTeXElement -> Bool
- clean :: Config
- conservative :: Config
- busy :: Config
- small :: Config
- footnote :: Config
- whitelist :: [String] -> LaTeXElement -> Bool
- blacklist :: [String] -> LaTeXElement -> Bool
- after :: [String] -> LaTeXElement -> Bool
- isolateWith :: [(String, String)] -> LaTeXElement -> Maybe Text
- findConfigName :: Text -> [(String, String)] -> Maybe Text
- type Profile = Map Text Config
- type SubParser a = ParserState -> a -> Either String (a, ParserState)
- data StopState
- = None
- | NewLine
- | Stop
- | NewSentence
- newSentence :: (Text -> Text) -> (Text -> Text) -> StopState -> Text -> Text
- data PatternReplace = PatternReplace {
- pattern :: Text
- replacement :: Text
Parser user state
Configuration data type
Config | |
|
defaultPeriodChars :: [Char] Source
defaultSearch :: LaTeXElement -> Bool Source
defaultSkip :: LaTeXElement -> Bool Source
defaultUnskip :: LaTeXElement -> Bool Source
defaultEos :: LaTeXElement -> Bool Source
defaultReplace :: StopState -> Text -> Text Source
defaultReplaceFilter :: Text -> Bool Source
Configuration presets
(&&&) :: (LaTeXElement -> Bool) -> (LaTeXElement -> Bool) -> LaTeXElement -> Bool Source
combinator for plugin construction
(|||) :: (LaTeXElement -> Bool) -> (LaTeXElement -> Bool) -> LaTeXElement -> Bool Source
conservative configuration
whitelist :: [String] -> LaTeXElement -> Bool Source
blacklist :: [String] -> LaTeXElement -> Bool Source
after :: [String] -> LaTeXElement -> Bool Source
isolateWith :: [(String, String)] -> LaTeXElement -> Maybe Text Source
Profile data type
Subparser data type
type SubParser a = ParserState -> a -> Either String (a, ParserState) Source
Stop state
None | within a sentence |
NewLine | one newline read |
Stop | stop character read |
NewSentence | begin of a new sentence |
Pattern search and replace (exceptions from processing)
data PatternReplace Source
PatternReplace | |
|