summaryrefslogtreecommitdiff
path: root/Main.hs
Commit message (Collapse)AuthorAge
* Added a plugin system, based on hint.fiddlosopher2009-01-24
| | | | | | | | | | | | | | | | | | | + In Text.Pandoc.Definition, added processIn, processInM, and queryIn, and deprecated processPandoc and queryPandoc for these more general functions, which are useful in writing plugins. + Added module Text.Pandoc.Plugins. + Added a --plugins option to Main, and code to run the parsed pandoc document through all the plugins. + Provided five sample plugin files in the plugins/ directory. + Documented --plugin in the pandoc man page and README. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1519 788f1e2b-df1e-0410-8736-df70ead52e1b
* Brought citeproc support up to date for citeproc-hs-0.2.fiddlosopher2008-12-29
| | | | | | | (Patch by Andrea Rossato.) git-svn-id: https://pandoc.googlecode.com/svn/trunk@1518 788f1e2b-df1e-0410-8736-df70ead52e1b
* Use +lhs suffixes in formats instead of options to trigger lhs.fiddlosopher2008-12-02
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@1507 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added --lhs-out option.fiddlosopher2008-12-02
| | | | | | | | | + Added writerLiterateHaskell to WriterOptions. + Added --lhs-out option to Main. + Added --lhs option (combines --lhs-out and --lhs-in) git-svn-id: https://pandoc.googlecode.com/svn/trunk@1500 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added literate haskell support for markdown reader.fiddlosopher2008-12-02
| | | | | | | | | | + Added stateLiterateHaskell to parser state. + Added parser for lhsCodeBlock to Markdown reader. + Added --lhs-in option, to treat input as literate haskell. + If first source has extension .lhs, assume --lhs-in. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1497 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added --jsmath option.fiddlosopher2008-10-28
| | | | | | | | | | | | - Added --jsmath option to Main.hs - Added JsMath to HTMLMathMethod in Text.Pandoc.Shared. - Handle math appropriately in HTML writer when JsMath selected. - Documented the option in README and man page. Resolves Issue #68. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1472 788f1e2b-df1e-0410-8736-df70ead52e1b
* Changed date on copyright message in Main.hs.fiddlosopher2008-10-18
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@1466 788f1e2b-df1e-0410-8736-df70ead52e1b
* Have the '-v' option print syntax highlighting languages separated by commas,fiddlosopher2008-09-30
| | | | | | | and wrapped in lines, instead of in five columns as before. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1459 788f1e2b-df1e-0410-8736-df70ead52e1b
* Use Data.List's 'intercalate' instead of custom 'joinWithSep'.fiddlosopher2008-09-08
| | | | | | | | | + Removed joinWithSep definition from Text.Pandoc.Shared. + Replaced joinWithSep with intercalate + Depend on base >= 3, since in base < 3 intercalate is not included. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1428 788f1e2b-df1e-0410-8736-df70ead52e1b
* Removed PDF writer from core pandoc, restored markdown2pdf.fiddlosopher2008-08-27
| | | | | | | | | | | | | | | | | | | | | + Added markdown2pdf. + Removed Text/Pandoc/PDF.hs. + Removed references to PDF writer from Main.hs. + Removed references to PDF writer from pandoc.cabal. + Added markdown2pdf.1 to list of man pages in Setup.hs. + Added markdown2pdf.1.md man page source. + Added reference to markdown2pdf(1) in pandoc man page. + Added markdown2pdf to WRAPPERS in Makefile. + Removed mention of pdf writer from README; added markdown2pdf. + Added remarks on markdown2pdf dependencies to README.Debian. + Added markdown2pdf to web/index.txt.in. + Use markdown2pdf for pdf web demos. + Put markdown2pdf back into debian control and rules. + Added markdown2pdf to macports Portfile. + Added markdown2pdf to freebsd package. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1415 788f1e2b-df1e-0410-8736-df70ead52e1b
* Simplified and improved UTF8 handling:fiddlosopher2008-08-14
| | | | | | | | | | | | | | + Removed utf8-string cabal configuration flag. + Instead, we just include System.IO.UTF8 and Codec.Binary.UTF8.String from utf8-string package in the source tree, avoiding a dependency on utf8-string and avoiding crufty custom UTF8 code. (The old Text.Pandoc.UTF8 had problems with the getContents function.) + Removed lots of CPP directives that are no longer needed. + In Setup.hs, use '-i..' in running RunTests.hs, so the local UTF8 code will be found. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1411 788f1e2b-df1e-0410-8736-df70ead52e1b
* Support for display math; changed ASCIIMathML -> LaTeXMathML:fiddlosopher2008-08-13
| | | | | | | | | | | | | | | | | | | | | | | | | | Resolves Issue #47. + Added a DisplayMath/InlineMath selector to Math inlines. + Markdown parser yields DisplayMath for $$...$$. + LaTeX parser yields DisplayMath when appropriate. Removed mathBlock parsers, since the same effect is achieved by the math inline parsers, now that they handle display math. + Writers handle DisplayMath as appropriate for the format. + Changed -m option to use LaTeXMathML rather than ASCIIMathML. LaTeXMathML is closer to LaTeX in its display of math, and supports many non-math LaTeX environments. + Modified HTML writer to print raw TeX when LaTeXMathML is being used instead of suppressing it. + Removed ASCIIMathML files from data/ and added LaTeXMathML. + Replaced ASCIIMathML with LaTeXMathML in source files. + Modified README and pandoc man page source. + Modified web page. + Added --latexmathml option (kept --asciimathml as a synonym for backwards compatibility) + Modified tests accordingly; added new tests for display math. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1409 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added Text.Pandoc.PDF module, 'pdf' as new output option.fiddlosopher2008-08-10
| | | | | | | | | The module calls pdflatex to produce the PDF, and is basically shell scripting in haskell. But this is better than the existing markdown2pdf script, which is limited to POSIX. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1394 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added Text.Pandoc.UTF8 as a backup for when utf8-string is not present.fiddlosopher2008-08-08
| | | | | | | | | | | | | + Added Text.Pandoc.UTF8 + Changed flag name from utf8 to utf8-string + Changed CPP MACRO from _UTF8 to _UTF8STRING + Import IO functions from Text.Pandoc.UTF8 when utf8-string not available. + Removed utf8-string dependency from debian/control. + Removed pandoc.cabal.ghc66; we no longer support GHC 6.6 + Modified INSTALL instructions git-svn-id: https://pandoc.googlecode.com/svn/trunk@1383 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added support for Cite to Markdown reader, and conditional support for ↵fiddlosopher2008-08-04
| | | | | | | | | | | | citeproc module. + The citeproc cabal configuration option sets the _CITEPROC macro, which conditionally includes code for handling citations. + Added Text.Pandoc.Biblio module. + Made highlighting option default to False. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1376 788f1e2b-df1e-0410-8736-df70ead52e1b
* Improved configuration options and CPP macros.fiddlosopher2008-08-03
| | | | | | | | | | | | + Now all macros that serve as flags start with a single _. + Added message to '-v' output about UTF-8 support. + Made highlighting the default. If the highlighting-kate library is not present, cabal will deselect the option (unless it was explicitly set). + Add UTF8 support to test function in Text.Pandoc.Shared. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1374 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added 'utf8' configuration flag to pandoc.cabal.fiddlosopher2008-08-03
| | | | | | | | | This makes it possible to compile pandoc without utf8, using '-f-utf8' at configuration time. Utf-8 support is still the default. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1373 788f1e2b-df1e-0410-8736-df70ead52e1b
* Compatibility fixes for CPP, Cabal, and haddock:fiddlosopher2008-07-31
| | | | | | | | + Use CPP in "Extensions" field in pandoc.cabal. + Removed use of backslash string continuations in source files. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1350 788f1e2b-df1e-0410-8736-df70ead52e1b
* Use utf8-string's System.IO.UTF8 to replace Text.Pandoc.UTF8.fiddlosopher2008-07-31
| | | | | | | | | | | + removed Text/Pandoc/UTF8.hs + removed UTF8.hs notice from debian/copyright + adjusted main.hs, Text/Pandoc.hs, and Text/Pandoc/ODT.hs to use System.IO.UTF8 instead of Text.Pandoc.UTF8 + Added dependency on utf8-string to pandoc.cabal git-svn-id: https://pandoc.googlecode.com/svn/trunk@1347 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added 'odt' output option to pandoc:fiddlosopher2008-07-31
| | | | | | | | | | | | | | | | | Not a writer, but a module that inserts the output of the OpenDocument writer into an ODT archive. This replaces markdown2odt. + Added odt output option to Main.hs. + Added default for .odt output file. + Changed defaults so that .xml and .sgml aren't automatically DocBook. + Added odt writer to Text.Pandoc exports. + Added Text.Pandoc.ODT and included in pandoc.cabal. + Added reference.odt as data-file in pandoc.cabal. + Handle picture links in OpenDocument files using xml library. + Removed markdown2odt and references from Makefile, README, man. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1345 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added MediaWiki writer.fiddlosopher2008-07-27
| | | | | | | | | | | | | | | | | + Added Text/Pandoc/Writers/MediaWiki.hs + Added to pandoc.cabal + Added to Main.hs and Text/Pandoc.hs exports. + Added tests for mediawiki writer & table writer. + Added information on MediaWiki writer to README. + Added mediawiki markup to list of formats in pandoc(1) man page. + Updated debian/control with mediawiki output format. + Added mediawiki markup to description in macports portfile. + Updated freebsd package description to include mediawiki format. + Mention MediaWiki output format in web page index. + Added mediawiki demo to website. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1337 788f1e2b-df1e-0410-8736-df70ead52e1b
* Cleaned up Main.hs to eliminate -Wall warnings.fiddlosopher2008-06-17
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@1287 788f1e2b-df1e-0410-8736-df70ead52e1b
* Andrea Rossato's patch for OpenDocument support.fiddlosopher2008-03-19
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@1252 788f1e2b-df1e-0410-8736-df70ead52e1b
* Changes to Texinfo writer:fiddlosopher2008-02-24
| | | | | | | | | | | | | | | | | | | | | | | | + No space between paragraph and following @verbatim (provides more pleasing appearance in text formats) + Blank line consistently after list environments. + Removed deVerb. + Use @code instead of @verb for inline code (this solves the character escaping problem for texi2dvi and texi2pdf). + Modified test suite accordingly. + Added Peter Wang to copyright statement (for Texinfo.hs). + Added news of Texinfo writer to README. + Added Texinfo to list of formats in man page, and removed extra 'groff'. + Updated macports with Texinfo format. + Updated FreeBSD pkg-descr with Texinfo format. + Updated web page with Texinfo writer. + Added demos for Texinfo writer. + Added Texinfo to package description in debian/control. + Added texi & texinfo extensions to Main.hs, and fixed bug in determining default output extension. + Changed from texinfo to texi extension in web demo. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1244 788f1e2b-df1e-0410-8736-df70ead52e1b
* Committed novalazy's initial patch for texinfo output,fiddlosopher2008-02-24
| | | | | | | including tests for texinfo writer. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1243 788f1e2b-df1e-0410-8736-df70ead52e1b
* Have --version print a list of supported languages for syntax highlighting.fiddlosopher2008-02-09
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@1226 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added build option for syntax highlighting, with *optional* dependency on ↵fiddlosopher2008-02-09
| | | | | | | | | | | | | | | | | highlighting-kate. + pandoc.cabal includes a flag, 'highlighting', that causes a dependency on highlighting-kate. + if Setup.hs detects this dependency, it copies templates/Highlighting.yes.hs to Text/Pandoc/Highlighting.hs. Otherwise, it copies templates/Highlighting.no.hs. + The HTML writer imports this new module instead of Text.Highlighting.Kate. The new module exports highlightHtml, which either uses highlighting-kate to perform syntax highlighting or automatically returns a failure code, depending on whether highlighting support was selected. + --version now prints information about whether syntax highlighting support is compiled in. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1221 788f1e2b-df1e-0410-8736-df70ead52e1b
* Removed Text.Regex dependencies by rewriting using plain Haskell:fiddlosopher2008-02-09
| | | | | | | | | | + from Text.Pandoc.Writers.RTF + from Text.Pandoc.Writers.HTML + from Main + from pandoc.cabal git-svn-id: https://pandoc.googlecode.com/svn/trunk@1219 788f1e2b-df1e-0410-8736-df70ead52e1b
* Removed unnecessary imports.fiddlosopher2008-01-16
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@1189 788f1e2b-df1e-0410-8736-df70ead52e1b
* Made -c/--css option repeatable on the command line (like -H, -A, -B).fiddlosopher2008-01-08
| | | | | | | Documented repeatability of these options in README. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1186 788f1e2b-df1e-0410-8736-df70ead52e1b
* Changed copyright dates where appropriate to include 2008.fiddlosopher2008-01-08
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@1181 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added optional HTML sanitization using a whitelist.fiddlosopher2008-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When this option is specified (--sanitize-html on the command line), unsafe HTML tags will be replaced by HTML comments, and unsafe HTML attributes will be removed. This option should be especially useful for those who want to use pandoc libraries in web applications, where users will provide the input. + Main.hs: Added --sanitize-html option. + Text.Pandoc.Shared: Added stateSanitizeHTML to ParserState. + Text.Pandoc.Readers.HTML: - Added whitelists of sanitaryTags and sanitaryAttributes. - Added parsers to check these lists (and state) to see if a given tag or attribute should be counted unsafe. - Modified anyHtmlTag and anyHtmlEndTag to replace unsafe tags with comments. - Modified htmlAttribute to remove unsafe attributes. - Modified htmlScript and htmlStyle to remove these elements if unsafe. - Modified rawHtmlBlock to use anyHtmlBlockTag instead of anyHtmlTag and anyHtmlEndTag. This fixes a bug in markdown parsing, where inline tags would be included in raw HTML blocks. - Modified anyHtmlBlockTag to test for (not inline) rather than directly for block. This allows us to handle e.g. docbook in the markdown reader. - Minor tweaks in nonTitleNonHead and parseTitle. + Text.Pandoc.Readers.Markdown: - In non-strict mode use rawHtmlBlocks instead of htmlBlock. Simplified htmlBlock, since we know it's only called in strict mode. + Modified README and man pages to document new option. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1166 788f1e2b-df1e-0410-8736-df70ead52e1b
* Made -H, -A, and -B cumulative: if they are specified multiple times,fiddlosopher2008-01-01
| | | | | | | multiple files will be included. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1165 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added --gladtex and --mimetex options.fiddlosopher2007-12-01
| | | | | | | | | | + New HTMLMathMethod structure in WriterOptions keeps track of how to display math in HTML output. + If none of the special options are selected, default to displaying TeX math verbatim, with no enclosing $'s, in HTML. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1125 788f1e2b-df1e-0410-8736-df70ead52e1b
* Added HTMLMathMethod writer option.fiddlosopher2007-12-01
| | | | | | | This selects between asciimathml, mimetex, gladtex, and plain math. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1123 788f1e2b-df1e-0410-8736-df70ead52e1b
* Moved everything from src into the top-level directory.fiddlosopher2007-11-29
| | | | git-svn-id: https://pandoc.googlecode.com/svn/trunk@1104 788f1e2b-df1e-0410-8736-df70ead52e1b
* Reverted back to state as of r1062. The template haskell changesfiddlosopher2007-11-03
| | | | | | | are more trouble than they're worth. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1064 788f1e2b-df1e-0410-8736-df70ead52e1b
* Use template haskell to avoid the need for templates:fiddlosopher2007-11-03
+ Added library Text.Pandoc.Include, with a template haskell function $(includeStrFrom fname) to include a file as a string constant at compile time. + This removes the need for the 'templates' directory or Makefile target. These have been removed. + The base source directory has been changed from src to . + A new 'data' directory has been added, containing the ASCIIMathML.js script, writer headers, and S5 files. + The src/wrappers directory has been moved to 'wrappers'. + The Text.Pandoc.ASCIIMathML library is no longer needed, since Text.Pandoc.Writers.HTML can use includeStrFrom to include the ASCIIMathML.js code directly. It has been removed. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1063 788f1e2b-df1e-0410-8736-df70ead52e1b