aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
AgeCommit message (Collapse)AuthorFilesLines
2007-07-19Added escapeCharAsString to Text.Pandoc.Shared.fiddlosopher1-0/+9
git-svn-id: https://pandoc.googlecode.com/svn/trunk@738 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-16Simplified inlinesInBalanced, using lookAhead.fiddlosopher1-5/+5
git-svn-id: https://pandoc.googlecode.com/svn/trunk@732 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-15Markdown reader: Added inlinesInBalanced parser combinator tofiddlosopher1-29/+24
unify treatment of embedded brackets in links and inline footnotes. Note that the solution adopted here causes one of John Gruber's markdown tests to fail: [with_underscore](/url/with_underscore) Here the whole phrase "underscore](/url/with" is treated as emphasized. The previous version of the markdown reader handled this the way Gruber's script handles it, but it ran into trouble on the following: [link with verbatim `]`](/url) where the inner ] was treated as the end of the reference link label. I don't see any good way to handle both cases in the framework of pandoc, so I choose to require an escape in the first example: [with\_underscore](/url/with_underscore) git-svn-id: https://pandoc.googlecode.com/svn/trunk@729 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-15Added charsInBalanced parser combinator to Text.Pandoc.ParserCombinators.fiddlosopher1-1/+17
This is not currently used, but should be useful in parsing strings containing balanced pairs of brackets or parentheses. git-svn-id: https://pandoc.googlecode.com/svn/trunk@728 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-15ConTeXt writer changes:fiddlosopher1-1/+1
+ Use defined blockquote environment for block quotes (smaller font, no indent, narrower text) + Changed default font to 12pt + Changed default page layout git-svn-id: https://pandoc.googlecode.com/svn/trunk@725 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-15Merged branches/context: addition of a ConTeXt writerfiddlosopher1-0/+225
<http://www.pragma-ade.nl/>. + Text.Pandoc.Writers.ConTeXt added. + Text.Pandoc modified to export the basic ConTeXt writer. + Main.hs modified to recognize 'context' as a writer. + ConTeXtHeader added to headers + DefaultHeaders.hs template modified to include ConTeXt header + Tests added (writer.context, tables.context), and runtests.pl modified to run them + pandoc.cabal updated to include Text.Pandoc.Writers.ConTeXt. git-svn-id: https://pandoc.googlecode.com/svn/trunk@716 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-15Removed an unused function in LaTeX writer.fiddlosopher1-2/+0
git-svn-id: https://pandoc.googlecode.com/svn/trunk@714 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-14Simplified special character escaping code in LaTeX writer.fiddlosopher1-12/+18
git-svn-id: https://pandoc.googlecode.com/svn/trunk@705 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-14Small comment fix in LaTeX writer.fiddlosopher1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@704 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-14Change to footnotes in HTML writer: Instead of putting the footnotefiddlosopher1-5/+18
backlink on a line by itself, after the content of the note, we now put it at the end of the last paragraph of the footnote. This saves space and looks better. More specifically: + If the last block of the note is a Para or Plain block, the backlink is put at the end of that block's contents. + Otherwise, the backlink is put in a separate Plain block by itself, after the footnote's contents. git-svn-id: https://pandoc.googlecode.com/svn/trunk@697 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-13Changed encodeUTF8 to toUTF8, decodeUTF8 to fromUTF8,fiddlosopher1-16/+16
for clarity. git-svn-id: https://pandoc.googlecode.com/svn/trunk@692 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-12HTML reader: haddock comment fix.fiddlosopher1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@690 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-12Export NoteTable in Text.Pandoc.Shared.fiddlosopher1-0/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@688 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-12Change to defaultWriterOptions: standalone is False by default.fiddlosopher1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@685 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-09Markdown reader: Parse bracketed text in inline footnotes. Previously,fiddlosopher1-2/+10
"test^[my [note] contains brackets]" would yield a note with contents "my [note". Now it yields a note with contents "my [note] contains brackets". New function: inlinesInBrackets. Resolves Issue 14. git-svn-id: https://pandoc.googlecode.com/svn/trunk@665 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-09RST reader: Allow hyperlink target URIs to be split over multiplefiddlosopher1-10/+14
lines, and to start on the line after the reference. Resolves Issue 7. git-svn-id: https://pandoc.googlecode.com/svn/trunk@664 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-09Moved Text.ParserCombinators.Pandoc ->fiddlosopher5-4/+128
Text.Pandoc.ParserCombinators. This way, all the Pandoc modules are in one place. git-svn-id: https://pandoc.googlecode.com/svn/trunk@663 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-09Added type declaration for hsepBlocks infiddlosopher1-0/+1
Text.Pandoc.Blocks. git-svn-id: https://pandoc.googlecode.com/svn/trunk@662 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-09Text.Pandoc.Blocks:fiddlosopher2-2/+3
+ Fixed a bug in hPad, which previously padded the rightmost cell. This is fixed by introducing a case for a singleton list. + Fixed Markdown writer so that the space after a table is not nested two spaces. + Adjusted Markdown table tests accordingly. git-svn-id: https://pandoc.googlecode.com/svn/trunk@660 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-09Markdown writer:fiddlosopher1-3/+3
Fixed a small problem with lengths of dashed lines in tables. git-svn-id: https://pandoc.googlecode.com/svn/trunk@659 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-09Added --toc support to Markdown writer.fiddlosopher1-6/+26
git-svn-id: https://pandoc.googlecode.com/svn/trunk@658 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-09Added support for --toc to RTF writer.fiddlosopher1-2/+20
git-svn-id: https://pandoc.googlecode.com/svn/trunk@657 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-09Moved isHeaderBlock from Text.Pandoc.Writers.HTMLfiddlosopher2-5/+6
to Text.Pandoc.Shared. git-svn-id: https://pandoc.googlecode.com/svn/trunk@656 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08Regularized the scheme for unique header identifiers in HTML writer:fiddlosopher1-4/+14
- punctuation is now all removed (except -) - spaces are turned into - - all lowercase This scheme should be fairly predictable. Updated tests accordingly. git-svn-id: https://pandoc.googlecode.com/svn/trunk@655 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08HTML writer changes:fiddlosopher1-5/+5
+ change in scheme for construction of unique identifiers for headers: - all lowercase - spaces turn into -, not _ + TOC items now have their own identifiers, starting with TOC- + when there is a TOC, headers link back to the corresponding TOC items, rather than the top of the TOC. git-svn-id: https://pandoc.googlecode.com/svn/trunk@653 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08Added --toc support to RST writer.fiddlosopher1-4/+7
git-svn-id: https://pandoc.googlecode.com/svn/trunk@652 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08Man writer: Don't print .\" t at beginning unless we'refiddlosopher1-1/+1
in --standalone mode. git-svn-id: https://pandoc.googlecode.com/svn/trunk@650 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08LaTeX writer:fiddlosopher1-6/+11
+ Leave extra blank line after \maketitle + Insert \tableofcontents if --toc option was selected Test suite: + extra blank line after \maketitle in writer.latex git-svn-id: https://pandoc.googlecode.com/svn/trunk@649 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08HTML writer: Slight change in code for generating uniquefiddlosopher1-1/+1
identifiers. The numbers used after duplicate identifiers are now separated from them by a hyphen: Duplicate-1 rather than Duplicate1. git-svn-id: https://pandoc.googlecode.com/svn/trunk@648 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08Fixed bug in Notes ($$ instead of <>), which causedfiddlosopher1-1/+1
note blocks to be indented. git-svn-id: https://pandoc.googlecode.com/svn/trunk@646 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-07Adjusted copyright notices to 2006-7; usefiddlosopher15-43/+43
real email address instead of lamely attempting to obfuscate. git-svn-id: https://pandoc.googlecode.com/svn/trunk@640 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-07Haddock documentation for Text.Pandoc.Blocks.fiddlosopher1-4/+51
git-svn-id: https://pandoc.googlecode.com/svn/trunk@638 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-07Man writer: Use integral n measures instead of fractional ifiddlosopher1-1/+2
measures. Calculate on basis of a 70 character line, since the default is 78 but the table will appear indented 8 spaces in standard man output. git-svn-id: https://pandoc.googlecode.com/svn/trunk@637 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-07Put table of contents in its own div (id="toc").fiddlosopher1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@635 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-07HTML writer modifications:fiddlosopher1-23/+57
+ Added code to HTML Writer to generate a table of contents if the writerTableOfContents option is specified. This is an unordered list with links to the headers. It is constructed hierarchically, based on the order of the headers and their levels. + If a TOC is used, the headers become links back to the TOC. + Removed Toc from WriterState; instead, the TOC is generated at the top level, by the function tableOfContents. + Fixed a bug in uniqueIdentifiers which prevented it from handling more than one duplicate. git-svn-id: https://pandoc.googlecode.com/svn/trunk@634 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-07+ Introduced writerIgnoreNotes option in WriterOptions. This is neededfiddlosopher2-20/+25
for processing header blocks for a table of contents, since notes on headers should not appear in the TOC. Set default in Main.hs. + Moved Element, headerAtLeast, and hierarchicalize from Docbook writer to Text.Pandoc.Shared. This is because HTML writer now uses these in constructing a table of contents. git-svn-id: https://pandoc.googlecode.com/svn/trunk@633 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-07Added writerTableOfContents to WriterOptions, and added afiddlosopher1-11/+13
--table-of-contents/--toc command-line option to Main.hs. git-svn-id: https://pandoc.googlecode.com/svn/trunk@632 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-07Changes to HTML writer to incorporate automatic identifiers forfiddlosopher1-16/+66
headers and table of contents: + WriterState now includes a list of header identifiers and a table of contents in addition to notes. + The function uniqueIdentifiers creates a list of unique identifiers from a list of inline lists (e.g. headers). + This list is part of WriterState and gets consumed by blockToHtml each time a header is encountered. + Headers are now printed with unique identifiers based on their names, e.g. Shell_scripts for "# Shell scripts". Fancy stuff like links, italics, etc. gets ignored. A numerical index is added to the end if there is already an identifier by the same name, e.g. "Shell_scripts1". + Provision has been made for a table-of-contents block element, but this has not yet been added. git-svn-id: https://pandoc.googlecode.com/svn/trunk@630 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-07Minor comment change.fiddlosopher1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@629 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-06Fixed bug in Markdown reader: links in footnotes were notfiddlosopher1-4/+10
being processed. Solution: three-stage parse. First, get all the reference keys and add information to state. Next, get all the notes and add information to state. (Reference keys may be needed at this stage.) Finally, parse everything else. git-svn-id: https://pandoc.googlecode.com/svn/trunk@625 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-05Added table support to RST writer.fiddlosopher1-3/+34
git-svn-id: https://pandoc.googlecode.com/svn/trunk@624 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-04Added table support to markdown writer.fiddlosopher1-3/+34
git-svn-id: https://pandoc.googlecode.com/svn/trunk@623 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-04Improvements/bug fixes to Text.Pandoc.Blocksfiddlosopher1-3/+32
library. git-svn-id: https://pandoc.googlecode.com/svn/trunk@622 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-04Added Text.Pandoc.Blocks module for prettyprinting offiddlosopher1-0/+63
text tables. git-svn-id: https://pandoc.googlecode.com/svn/trunk@620 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-04Man writer:fiddlosopher1-3/+9
- Added scheme for specifying manual section and additional headers: % PROGNAM | 1 | User Manual | Version 4.0 - Modified man page sources to include section 1 git-svn-id: https://pandoc.googlecode.com/svn/trunk@619 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-04Added table support to man writer (using the tbl preprocessor).fiddlosopher1-10/+36
The writer state now includes a list of "preprocessor" codes. If the document contains a table, "t" (for "tbl") is added to the list. If this list is nonempty, the man page starts with .\" <list> which instructs man to run the file through the appropriate preprocessor before processing with groff. git-svn-id: https://pandoc.googlecode.com/svn/trunk@618 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-02Man writer: don't change - to \- (minus sign).fiddlosopher1-1/+1
Leave them as hyphens. git-svn-id: https://pandoc.googlecode.com/svn/trunk@614 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-02Man writer: better output for line break:fiddlosopher1-1/+1
.PD 0 # set interparagraph space to 0 .P # new paragraph .PD # reset interparagraph space to default. git-svn-id: https://pandoc.googlecode.com/svn/trunk@613 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-02Minor changes in Man writer:fiddlosopher1-18/+26
- escape ' as \[aq], because ' can trigger groff commands. - remove unneeded line breaks. - use CR font in code blocks. - use .P 0 for line breaks. git-svn-id: https://pandoc.googlecode.com/svn/trunk@612 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-01Modified escaping in Man writer. Also changedfiddlosopher1-5/+5
format of footnote references and authors list. git-svn-id: https://pandoc.googlecode.com/svn/trunk@608 788f1e2b-df1e-0410-8736-df70ead52e1b