Spellcheck comments
This commit is contained in:
parent
732e66d4c4
commit
f6dfb632ff
22 changed files with 26 additions and 26 deletions
|
@ -882,10 +882,10 @@ adjustImagePath _ _ x = x
|
|||
-- of things that would normally be obtained through IO.
|
||||
data PureState = PureState { stStdGen :: StdGen
|
||||
, stWord8Store :: [Word8] -- should be
|
||||
-- inifinite,
|
||||
-- infinite,
|
||||
-- i.e. [1..]
|
||||
, stUniqStore :: [Int] -- should be
|
||||
-- inifinite and
|
||||
-- infinite and
|
||||
-- contain every
|
||||
-- element at most
|
||||
-- once, e.g. [1..]
|
||||
|
|
|
@ -55,7 +55,7 @@ import qualified Foreign.Lua.Module.Text as Lua
|
|||
import qualified Text.Pandoc.Definition as Pandoc
|
||||
|
||||
-- | Run the lua interpreter, using pandoc's default way of environment
|
||||
-- initalization.
|
||||
-- initialization.
|
||||
runPandocLua :: Lua a -> PandocIO (Either LuaException a)
|
||||
runPandocLua luaOp = do
|
||||
luaPkgParams <- luaPackageParams
|
||||
|
|
|
@ -1289,7 +1289,7 @@ type SubstTable = M.Map Key Inlines
|
|||
-- unique identifier, and update the list of identifiers
|
||||
-- in state. Issue a warning if an explicit identifier
|
||||
-- is encountered that duplicates an earlier identifier
|
||||
-- (explict or automatically generated).
|
||||
-- (explicit or automatically generated).
|
||||
registerHeader :: (Stream s m a, HasReaderOptions st,
|
||||
HasHeaderMap st, HasLogMessages st, HasIdentifierList st)
|
||||
=> Attr -> Inlines -> ParserT s st m Attr
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{-
|
||||
Copyright (C) 2017 Sascha Wilde <wilde@sha-bang.de>
|
||||
|
||||
partly based on all the other readers, especialy the work by
|
||||
partly based on all the other readers, especially the work by
|
||||
John MacFarlane <jgm@berkeley.edu> and
|
||||
Alexander Sulfrian <alexander.sulfrian@fu-berlin.de>
|
||||
all bugs are solely created by me.
|
||||
|
|
|
@ -785,7 +785,7 @@ So we do this in a number of steps. If we encounter the fldchar begin
|
|||
tag, we start open a fldchar state variable (see state above). We add
|
||||
the instrtext to it as FieldInfo. Then we close that and start adding
|
||||
the runs when we get to separate. Then when we get to end, we produce
|
||||
the Field type with approriate FieldInfo and Runs.
|
||||
the Field type with appropriate FieldInfo and Runs.
|
||||
-}
|
||||
elemToParPart ns element
|
||||
| isElem ns "w" "r" element
|
||||
|
|
|
@ -73,7 +73,7 @@ readEPUB opts bytes = case toArchiveOrFail bytes of
|
|||
-- runEPUB :: Except PandocError a -> Either PandocError a
|
||||
-- runEPUB = runExcept
|
||||
|
||||
-- Note that internal reference are aggresively normalised so that all ids
|
||||
-- Note that internal reference are aggressively normalised so that all ids
|
||||
-- are of the form "filename#id"
|
||||
--
|
||||
archiveToEPUB :: (PandocMonad m) => ReaderOptions -> Archive -> m Pandoc
|
||||
|
|
|
@ -852,7 +852,7 @@ pInTags' tagtype tagtest parser = try $ do
|
|||
pSatisfy (\t -> t ~== TagOpen tagtype [] && tagtest t)
|
||||
mconcat <$> manyTill parser (pCloses tagtype <|> eof)
|
||||
|
||||
-- parses p, preceeded by an optional opening tag
|
||||
-- parses p, preceded by an optional opening tag
|
||||
-- and followed by an optional closing tags
|
||||
pOptInTag :: PandocMonad m => Text -> TagParser m a -> TagParser m a
|
||||
pOptInTag tagtype p = try $ do
|
||||
|
@ -1281,7 +1281,7 @@ instance HasLastStrPosition HTMLState where
|
|||
setLastStrPos s st = st {parserState = setLastStrPos s (parserState st)}
|
||||
getLastStrPos = getLastStrPos . parserState
|
||||
|
||||
-- For now we need a special verison here; the one in Shared has String type
|
||||
-- For now we need a special version here; the one in Shared has String type
|
||||
renderTags' :: [Tag Text] -> Text
|
||||
renderTags' = renderTagsOptions
|
||||
renderOptions{ optMinimize = matchTags ["hr", "br", "img",
|
||||
|
|
|
@ -100,7 +100,7 @@ liftA fun a = a >>^ fun
|
|||
-- | Duplicate a value to subsequently feed it into different arrows.
|
||||
-- Can almost always be replaced with '(&&&)', 'keepingTheValue',
|
||||
-- or even '(|||)'.
|
||||
-- Aequivalent to
|
||||
-- Equivalent to
|
||||
-- > returnA &&& returnA
|
||||
duplicate :: (Arrow a) => a b (b,b)
|
||||
duplicate = arr $ join (,)
|
||||
|
@ -114,7 +114,7 @@ infixr 2 >>%
|
|||
|
||||
|
||||
-- | Duplicate a value and apply an arrow to the second instance.
|
||||
-- Aequivalent to
|
||||
-- Equivalent to
|
||||
-- > \a -> duplicate >>> second a
|
||||
-- or
|
||||
-- > \a -> returnA &&& a
|
||||
|
|
|
@ -50,7 +50,7 @@ class (Eq nsID, Ord nsID) => NameSpaceID nsID where
|
|||
getNamespaceID :: NameSpaceIRI
|
||||
-> NameSpaceIRIs nsID
|
||||
-> Maybe (NameSpaceIRIs nsID, nsID)
|
||||
-- | Given a namespace id, lookup its IRI. May be overriden for performance.
|
||||
-- | Given a namespace id, lookup its IRI. May be overridden for performance.
|
||||
getIRI :: nsID
|
||||
-> NameSpaceIRIs nsID
|
||||
-> Maybe NameSpaceIRI
|
||||
|
|
|
@ -61,7 +61,7 @@ import qualified Data.Foldable as F (Foldable, foldr)
|
|||
import Data.Maybe
|
||||
|
||||
|
||||
-- | Aequivalent to
|
||||
-- | Equivalent to
|
||||
-- > foldr (.) id
|
||||
-- where '(.)' are 'id' are the ones from "Control.Category"
|
||||
-- and 'foldr' is the one from "Data.Foldable".
|
||||
|
@ -72,7 +72,7 @@ import Data.Maybe
|
|||
composition :: (Category cat, F.Foldable f) => f (cat a a) -> cat a a
|
||||
composition = F.foldr (<<<) Cat.id
|
||||
|
||||
-- | Aequivalent to
|
||||
-- | Equivalent to
|
||||
-- > foldr (flip (.)) id
|
||||
-- where '(.)' are 'id' are the ones from "Control.Category"
|
||||
-- and 'foldr' is the one from "Data.Foldable".
|
||||
|
|
|
@ -261,7 +261,7 @@ convertingExtraState v a = withSubStateF setVAsExtraState modifyWithA
|
|||
-- The resulting converter even behaves like an identity converter on the
|
||||
-- value level.
|
||||
--
|
||||
-- Aequivalent to
|
||||
-- Equivalent to
|
||||
--
|
||||
-- > \v x a -> convertingExtraState v (returnV x >>> a)
|
||||
--
|
||||
|
|
|
@ -342,7 +342,7 @@ instance Read XslUnit where
|
|||
readsPrec _ _ = []
|
||||
|
||||
-- | Rough conversion of measures into millimetres.
|
||||
-- Pixels and em's are actually implementation dependant/relative measures,
|
||||
-- Pixels and em's are actually implementation dependent/relative measures,
|
||||
-- so I could not really easily calculate anything exact here even if I wanted.
|
||||
-- But I do not care about exactness right now, as I only use measures
|
||||
-- to determine if a paragraph is "indented" or not.
|
||||
|
|
|
@ -743,7 +743,7 @@ latexEnd envName = try $
|
|||
|
||||
|
||||
--
|
||||
-- Footnote defintions
|
||||
-- Footnote definitions
|
||||
--
|
||||
noteBlock :: PandocMonad m => OrgParser m (F Blocks)
|
||||
noteBlock = try $ do
|
||||
|
|
|
@ -510,7 +510,7 @@ anchor = try $ do
|
|||
<* string ">>"
|
||||
<* skipSpaces
|
||||
|
||||
-- | Replace every char but [a-zA-Z0-9_.-:] with a hypen '-'. This mirrors
|
||||
-- | Replace every char but [a-zA-Z0-9_.-:] with a hyphen '-'. This mirrors
|
||||
-- the org function @org-export-solidify-link-text@.
|
||||
|
||||
solidify :: String -> String
|
||||
|
|
|
@ -540,7 +540,7 @@ wordChunk = try $ do
|
|||
str :: PandocMonad m => ParserT [Char] ParserState m Inlines
|
||||
str = do
|
||||
baseStr <- hyphenedWords
|
||||
-- RedCloth compliance : if parsed word is uppercase and immediatly
|
||||
-- RedCloth compliance : if parsed word is uppercase and immediately
|
||||
-- followed by parens, parens content is unconditionally word acronym
|
||||
fullStr <- option baseStr $ try $ do
|
||||
guard $ all isUpper baseStr
|
||||
|
|
|
@ -167,7 +167,7 @@ table = try $ do
|
|||
-- return $ B.simpleTable (headers rows) $ trace ("rows: " ++ (show rows)) rows
|
||||
return $B.simpleTable (headers rows) rows
|
||||
where
|
||||
-- The headers are as many empty srings as the number of columns
|
||||
-- The headers are as many empty strings as the number of columns
|
||||
-- in the first row
|
||||
headers rows = map (B.plain . B.str) $replicate (length $ head rows) ""
|
||||
|
||||
|
|
|
@ -198,7 +198,7 @@ para = try $ do
|
|||
commentBlock :: T2T Blocks
|
||||
commentBlock = try (blockMarkupArea anyLine (const mempty) "%%%") <|> comment
|
||||
|
||||
-- Seperator and Strong line treated the same
|
||||
-- Separator and Strong line treated the same
|
||||
hrule :: T2T Blocks
|
||||
hrule = try $ do
|
||||
spaces
|
||||
|
|
|
@ -712,7 +712,7 @@ schemes = Set.fromList
|
|||
, "ws", "wss", "wtai", "wyciwyg", "xcon", "xcon-userid", "xfire"
|
||||
, "xmlrpc.beep", "xmlrpc.beeps", "xmpp", "xri", "ymsgr", "z39.50", "z39.50r"
|
||||
, "z39.50s"
|
||||
-- Inofficial schemes
|
||||
-- Unofficial schemes
|
||||
, "doi", "isbn", "javascript", "pmid"
|
||||
]
|
||||
|
||||
|
|
|
@ -230,7 +230,7 @@ writeDocx opts doc@(Pandoc meta _) = do
|
|||
let mbAttrMarLeft = (elAttribs <$> mbpgmar) >>= lookupAttrBy ((=="left") . qName)
|
||||
let mbAttrMarRight = (elAttribs <$> mbpgmar) >>= lookupAttrBy ((=="right") . qName)
|
||||
|
||||
-- Get the avaible area (converting the size and the margins to int and
|
||||
-- Get the available area (converting the size and the margins to int and
|
||||
-- doing the difference
|
||||
let pgContentWidth = (-) <$> (read <$> mbAttrSzWidth ::Maybe Integer)
|
||||
<*> (
|
||||
|
|
|
@ -153,7 +153,7 @@ writeICML opts (Pandoc meta blocks) = do
|
|||
Nothing -> return main
|
||||
Just tpl -> renderTemplate' tpl context
|
||||
|
||||
-- | Auxilary functions for parStylesToDoc and charStylesToDoc.
|
||||
-- | Auxiliary functions for parStylesToDoc and charStylesToDoc.
|
||||
contains :: String -> (String, (String, String)) -> [(String, String)]
|
||||
contains s rule =
|
||||
[snd rule | (fst rule) `isInfixOf` s]
|
||||
|
|
|
@ -266,7 +266,7 @@ orderedListItemToOrg marker items = do
|
|||
contents <- blockListToOrg items
|
||||
return $ hang (length marker + 1) (text marker <> space) (contents <> cr)
|
||||
|
||||
-- | Convert defintion list item (label, list of blocks) to Org.
|
||||
-- | Convert definition list item (label, list of blocks) to Org.
|
||||
definitionListItemToOrg :: PandocMonad m
|
||||
=> ([Inline], [[Block]]) -> Org m Doc
|
||||
definitionListItemToOrg (label, defs) = do
|
||||
|
|
|
@ -333,7 +333,7 @@ orderedListItemToRST marker items = do
|
|||
let marker' = marker ++ " "
|
||||
return $ hang (length marker') (text marker') $ contents <> cr
|
||||
|
||||
-- | Convert defintion list item (label, list of blocks) to RST.
|
||||
-- | Convert definition list item (label, list of blocks) to RST.
|
||||
definitionListItemToRST :: PandocMonad m => ([Inline], [[Block]]) -> RST m Doc
|
||||
definitionListItemToRST (label, defs) = do
|
||||
label' <- inlineListToRST label
|
||||
|
|
Loading…
Add table
Reference in a new issue