diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2012-10-13 11:33:55 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2012-10-13 11:33:55 -0700 |
commit | b5dd06d30374edb7a2756ba58019d7f21f3bbfe5 (patch) | |
tree | c1ab0bb0361cfd9f65a9bed9583b845248a9119a /src/Text/Pandoc/Options.hs | |
parent | 9a77a3f15ba4201a0b617a814b73d2eb9cad11fc (diff) |
Moved bibliography processing into readers.
Previously this was done in src/pandoc.hs, which made it difficult
for library users.
* Removed readerCitations in ReaderOptions.
* Added readerReferences and readerCitationStyle to ReaderOptions.
* Moved use of processBiblio from main program to the
markdown and LaTeX readers.
Diffstat (limited to 'src/Text/Pandoc/Options.hs')
-rw-r--r-- | src/Text/Pandoc/Options.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Options.hs b/src/Text/Pandoc/Options.hs index 834810859..27661ecd4 100644 --- a/src/Text/Pandoc/Options.hs +++ b/src/Text/Pandoc/Options.hs @@ -44,6 +44,7 @@ import Data.Set (Set) import qualified Data.Set as Set import Data.Default import Text.Pandoc.Highlighting (Style, pygments) +import qualified Text.CSL as CSL -- | Individually selectable syntax extensions. data Extension = @@ -141,11 +142,12 @@ data ReaderOptions = ReaderOptions{ , readerOldDashes :: Bool -- ^ Use pandoc <= 1.8.2.1 behavior -- in parsing dashes; -- is em-dash; -- - before numerial is en-dash - , readerCitations :: [String] -- ^ List of available citations + , readerReferences :: [CSL.Reference] -- ^ Bibliographic references + , readerCitationStyle :: Maybe CSL.Style -- ^ Citation style , readerApplyMacros :: Bool -- ^ Apply macros to TeX math , readerIndentedCodeClasses :: [String] -- ^ Default classes for -- indented code blocks -} deriving (Show, Read) +} deriving (Show {- TODO need update in citeproc-hs , Read -}) instance Default ReaderOptions where def = ReaderOptions{ @@ -157,7 +159,8 @@ instance Default ReaderOptions , readerColumns = 80 , readerTabStop = 4 , readerOldDashes = False - , readerCitations = [] + , readerReferences = [] + , readerCitationStyle = Nothing , readerApplyMacros = True , readerIndentedCodeClasses = [] } |