Commit graph

25 commits

Author SHA1 Message Date
fiddlosopher
80715bd126 Added Text.Pandoc.UTF8 as a backup for when utf8-string is not present.
+ 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
2008-08-08 00:11:58 +00:00
fiddlosopher
1bfe1b84a8 Added support for Cite to Markdown reader, and conditional support for 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
2008-08-04 03:15:34 +00:00
fiddlosopher
6ff1e2a976 Improved configuration options and CPP macros.
+ 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
2008-08-03 23:33:40 +00:00
fiddlosopher
ed4b003997 Added 'utf8' configuration flag to pandoc.cabal.
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
2008-08-03 08:43:28 +00:00
fiddlosopher
8440385f45 Compatibility fixes for CPP, Cabal, and haddock:
+ 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
2008-07-31 23:55:27 +00:00
fiddlosopher
ebcebccc32 Use utf8-string's System.IO.UTF8 to replace Text.Pandoc.UTF8.
+ 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
2008-07-31 23:16:31 +00:00
fiddlosopher
d072ad4b66 Added 'odt' output option to pandoc:
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
2008-07-31 23:16:02 +00:00
fiddlosopher
ddaec05d8f Added MediaWiki writer.
+ 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
2008-07-27 03:25:51 +00:00
fiddlosopher
a8920f47aa Cleaned up Main.hs to eliminate -Wall warnings.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1287 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-06-17 18:55:42 +00:00
fiddlosopher
2baf6d09ee Andrea Rossato's patch for OpenDocument support.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1252 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-03-19 18:45:51 +00:00
fiddlosopher
858269dd20 Changes to Texinfo writer:
+ 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
2008-02-24 05:48:59 +00:00
fiddlosopher
49e0e507b7 Committed novalazy's initial patch for texinfo output,
including tests for texinfo writer.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1243 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-24 05:48:41 +00:00
fiddlosopher
d4d905f8a8 Have --version print a list of supported languages for syntax highlighting.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1226 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-09 03:22:01 +00:00
fiddlosopher
04b32451be Added build option for syntax highlighting, with *optional* dependency on 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
2008-02-09 03:21:19 +00:00
fiddlosopher
ba6981a4a1 Removed Text.Regex dependencies by rewriting using plain Haskell:
+ 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
2008-02-09 03:21:04 +00:00
fiddlosopher
d474852f56 Removed unnecessary imports.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1189 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-16 02:18:23 +00:00
fiddlosopher
c453e2f7d5 Made -c/--css option repeatable on the command line (like -H, -A, -B).
Documented repeatability of these options in README.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1186 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-08 20:21:28 +00:00
fiddlosopher
8fca649d05 Changed copyright dates where appropriate to include 2008.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1181 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-08 17:26:16 +00:00
fiddlosopher
5df912b162 Added optional HTML sanitization using a whitelist.
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
2008-01-03 21:32:32 +00:00
fiddlosopher
a505f70f0b Made -H, -A, and -B cumulative: if they are specified multiple times,
multiple files will be included.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1165 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-01 20:43:48 +00:00
fiddlosopher
ef028fee59 Added --gladtex and --mimetex options.
+ 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
2007-12-01 03:11:52 +00:00
fiddlosopher
0b15448d64 Added HTMLMathMethod writer option.
This selects between asciimathml, mimetex, gladtex, and plain math.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1123 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-01 03:11:44 +00:00
fiddlosopher
9a67a486c2 Moved everything from src into the top-level directory.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1104 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-29 02:02:34 +00:00
fiddlosopher
fe684764e6 Reverted back to state as of r1062. The template haskell changes
are more trouble than they're worth.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1064 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-03 23:27:58 +00:00
fiddlosopher
4a841bfc54 Use template haskell to avoid the need for templates:
+ 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
2007-11-03 22:14:03 +00:00
Renamed from src/Main.hs (Browse further)