Txt2Tags Reader: Integrated into pandoc
This commit is contained in:
parent
7d04d383a6
commit
ab3589ff0b
2 changed files with 6 additions and 1 deletions
|
@ -876,6 +876,7 @@ defaultReaderName fallback (x:xs) =
|
|||
".native" -> "native"
|
||||
".json" -> "json"
|
||||
".docx" -> "docx"
|
||||
".t2t" -> "t2t"
|
||||
_ -> defaultReaderName fallback xs
|
||||
|
||||
-- Returns True if extension of first source is .lhs
|
||||
|
@ -1181,7 +1182,7 @@ main = do
|
|||
let readFiles [] = error "Cannot read archive from stdin"
|
||||
readFiles (x:_) = B.readFile x
|
||||
|
||||
let convertTabs = tabFilter (if preserveTabs then 0 else tabStop)
|
||||
let convertTabs = tabFilter (if (preserveTabs || readerName' == "t2t") then 0 else tabStop)
|
||||
|
||||
let handleIncludes' = if readerName' == "latex" || readerName' == "latex+lhs"
|
||||
then handleIncludes
|
||||
|
|
|
@ -76,6 +76,8 @@ module Text.Pandoc
|
|||
, readHaddock
|
||||
, readNative
|
||||
, readJSON
|
||||
, readTxt2Tags
|
||||
, readTxt2TagsNoMacros
|
||||
-- * Writers: converting /from/ Pandoc format
|
||||
, Writer (..)
|
||||
, writeNative
|
||||
|
@ -130,6 +132,7 @@ import Text.Pandoc.Readers.Textile
|
|||
import Text.Pandoc.Readers.Native
|
||||
import Text.Pandoc.Readers.Haddock
|
||||
import Text.Pandoc.Readers.Docx
|
||||
import Text.Pandoc.Readers.Txt2Tags
|
||||
import Text.Pandoc.Writers.Native
|
||||
import Text.Pandoc.Writers.Markdown
|
||||
import Text.Pandoc.Writers.RST
|
||||
|
@ -227,6 +230,7 @@ readers = [ ("native" , StringReader $ \_ s -> return $ readNative s)
|
|||
,("latex" , mkStringReader readLaTeX)
|
||||
,("haddock" , mkStringReader readHaddock)
|
||||
,("docx" , mkBSReader readDocx)
|
||||
,("t2t" , mkStringReader readTxt2Tags)
|
||||
]
|
||||
|
||||
data Writer = PureStringWriter (WriterOptions -> Pandoc -> String)
|
||||
|
|
Loading…
Reference in a new issue