aboutsummaryrefslogtreecommitdiff
path: root/src/Text
AgeCommit message (Collapse)AuthorFilesLines
2007-11-01Cleaned up LaTeX footnotes:fiddlosopher1-5/+6
+ Footnotes start on a separate line. A comment % is used at the end of the previous line to prevent unwanted spaces. This makes footnotes easier to see, delete, and move around. + The final } now only appears on a separate line if it needs to (i.e. if the note ends with a Verbatim environment). git-svn-id: https://pandoc.googlecode.com/svn/trunk@1061 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-10-29Fixed bug in parsing files that begin with blank lines.fiddlosopher3-7/+7
+ In Text.Pandoc.Shared: rewrote lineClump to parse EITHER a string of blank lines OR a string of nonblanks. Removed code for parsing eof. + In Markdown and RST readers, use 'manyTill (... <|> lineClump) eof' instead of many, since lineClump no longer parses eof. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1057 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-10-28Modified specialChar in LaTeX reader so that '"'fiddlosopher1-1/+3
characters are parsed and do not cause an error. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1056 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-10-27Modified fromUTF8 to strip out the BOM (byte order marker)fiddlosopher1-0/+1
wherever it is present. See http://en.wikipedia.org/wiki/Byte_Order_Mark and http://six.pairlist.net/pipermail/markdown-discuss/2007-October/000874.html. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1054 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-10-18'--no-wrap' option now prevents the addition of structural whitespacefiddlosopher1-3/+9
in HTML output, minimizing the file size. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1053 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-10-15Removed 'version' constant from Main.hs; added 'pandocVersion' to Text.Pandoc.fiddlosopher1-0/+5
This way all programs that use pandoc libraries will have access to the version number. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1052 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-10-13Improvements to RST reader:fiddlosopher1-31/+38
+ Allow field lists to be indented. + Parse the contents of field lists instead of treating them as raw strings. + Represent field lists as definition lists rather than blockquotes. + Fixed bug in which metadata would be overridden if the document contained more than one field list. + Parse fields associated with ..image: blocks, and use the 'alt' field, if present, for image alt text and title. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1050 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-10-13Save and restore position in parseFromString, so that it doesn'tfiddlosopher1-0/+2
mess up accurate error location reporting. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1049 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-10-12Undid last change: instead of blocking the internal links in thefiddlosopher1-1/+0
writers, it makes more sense to block them in the HTML reader. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1048 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-10-11Man writer: Don't print link source for internal links (#...).fiddlosopher1-0/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1047 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-10-11Fixed bug in RST reader: previously, code blocks had to befiddlosopher1-13/+8
indented a full tabstop, but RST allows any amount of indentation. Resolves Issue #27. + removed 'variable' parameter from indentedBlock function in RST reader, as it is no longer needed + updated test suite + updated changelog git-svn-id: https://pandoc.googlecode.com/svn/trunk@1046 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-27Fixed bug in markdown writer: If an ordered list item began withfiddlosopher1-1/+5
a marker greater than 3 characters in width, and the item took more than one line, it would appear on the line after the list marker, e.g.: (12) My list item. Multiline. Now it works as follows: (12) My list item. Multiline. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1036 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-27Added a writer option for wrapped text and a command-line optionfiddlosopher5-22/+34
'--no-wrap', which disables text wrapping. (Resolves Issue #26.) + Added support for '--no-wrap' to Main.hs. + Added wrapIfNeeded function to Text.Pandoc.Shared. + Use wrapIfNeeded instead of wrapped in the RST, Man, Docbook, and Markdown writers. + Note: Not yet implemented in HTML, LaTeX, or ConTeXt writers. No documentation yet. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1034 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-25Fixed a bug in the Markdown writer: incorrect line wrapping in fiddlosopher1-2/+11
paragraphs including hard line breaks. Resolves Issue #25. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1032 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-19RST writer: If label for a link reference contains a colon,fiddlosopher1-1/+4
surround by ` signs so the colon won't be interpreted as the end of the link label. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1029 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-18Markdown writer: Don't print title attribute if title is empty.fiddlosopher1-1/+4
(This differs from the behavior of Markdown.pl, and agrees with PHP Markdown. But John Gruber has indicated that he prefers this behavior.) Adjusted test suite accordingly. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1026 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-18Markdown reader: require space before title in links and references.fiddlosopher1-5/+2
This fixes a bug in parsing URLs like http://silly/url(withparen). git-svn-id: https://pandoc.googlecode.com/svn/trunk@1025 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-17Remove just one leading and one trailing newlinefiddlosopher1-3/+11
from contents of <pre>...</pre> in codeBlock parser. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1023 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-17Changed parsing of code blocks in HTML reader:fiddlosopher1-7/+8
+ <code> tag is no longer needed. <pre> suffices. + all HTML tags in the code block (e.g. for syntax highlighting) are skipped, because they are not portable to other output formats. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1022 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-15Simplified HTML attribute parsing (HTML reader).fiddlosopher1-10/+5
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1016 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-14Fixed two bugs in HTML reader:fiddlosopher1-11/+4
+ <code>...</code> not surrounded by <pre> should count as inline HTML, not code block. + parser for minimized attributes should not swallow trailing spaces git-svn-id: https://pandoc.googlecode.com/svn/trunk@1015 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-10+ Fixed bug in RST writer's handling of ordered lists. Previously,fiddlosopher1-2/+2
list items with multiple lines would not always line up with single-line list items. Now, list items are nested the length of the list marker + 1. This looks better and ensures that list items all line up. (Note that list markers are padded to the length of the longest list marker in the series.) + Use 3-space indent for unordered lists. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1013 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-05Simplified parsing of reference keys and notes in markdown and RSTfiddlosopher3-57/+54
readers: + The Reference data structure from Text.Pandoc.Shared is no longer needed, since + referenceKey and noteBlock parses return strings (as many blank lines as are occuried by the key or note) and update state themselves. + getPosition and setPosition are now used to ensure that error messages will give the correct line number. + This yields cleaner (and slightly faster) code, with more accurate parsing error messages. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1012 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-05HTML writer: Don't produce HTML for table of contents iffiddlosopher1-0/+1
there are no headers. (This would be an empty list, which is invalid XHTML.) git-svn-id: https://pandoc.googlecode.com/svn/trunk@1011 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-02HTML writer: put anchors around contents of headers, not aroundfiddlosopher1-11/+11
the header tags themselves, when producing backlinks to TOC. Resolves Issue #23. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1000 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-02Markdown writer: escape paragraphs that begin with ordered listfiddlosopher1-1/+23
markers, so they don't get interpreted as ordered lists. git-svn-id: https://pandoc.googlecode.com/svn/trunk@988 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-02LaTeX command and environment names can't contain numbers.fiddlosopher1-4/+4
LaTeX reader updated accordingly. git-svn-id: https://pandoc.googlecode.com/svn/trunk@987 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-01Skip notes parsing if running in strict mode. (This yields a nicefiddlosopher1-14/+16
speed improvement in strict mode.) git-svn-id: https://pandoc.googlecode.com/svn/trunk@983 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-01Simplify autolink parsing code, using Network.URI to test forfiddlosopher1-25/+24
URIs. Added dependency on network library to debian/control and pandoc.cabal. git-svn-id: https://pandoc.googlecode.com/svn/trunk@982 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-01More perspicuous definition of nonindentSpaces.fiddlosopher1-1/+4
git-svn-id: https://pandoc.googlecode.com/svn/trunk@981 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-01Removed unneeded 'try' in 'rawLine'.fiddlosopher1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@979 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-01Combined linebreak and whitespace into a new whitespacefiddlosopher1-7/+6
parser, to avoid unnecessary reparsing of space characters. git-svn-id: https://pandoc.googlecode.com/svn/trunk@978 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-01Removed unnecessary 'try' in 'codeBlock'.fiddlosopher1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@977 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-01Use lookAhead in parsers for setext headers andfiddlosopher1-1/+5
definition lists to see if the next line begins appropriately; if not, don't waste any more time parsing... git-svn-id: https://pandoc.googlecode.com/svn/trunk@976 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-31Don't require blank lines after code block. (It's sufficientfiddlosopher1-1/+1
to end code block with a nonindented line.) git-svn-id: https://pandoc.googlecode.com/svn/trunk@975 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-31Changed definition of 'emph': italics with '_' must not be followedfiddlosopher1-1/+1
by an alphanumeric character. This is to help prevent interpretation of e.g. [LC_TYPE]: my_type as '[LC<em>TYPE]:my</em>type'. git-svn-id: https://pandoc.googlecode.com/svn/trunk@974 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-31Cleanup up Text.Pandoc.Shared to eliminate warningsfiddlosopher1-39/+40
when compiling with -Wall. git-svn-id: https://pandoc.googlecode.com/svn/trunk@969 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-30Replaced individual wrapping routines in RST, Man, andfiddlosopher3-23/+6
Markdown writers with 'wrapped' from Text.Pandoc.Shared. git-svn-id: https://pandoc.googlecode.com/svn/trunk@967 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-30Added 'wrapped' function to Text.Pandoc.Shared.fiddlosopher1-0/+7
This helps wrap text into paragraphs, using the prettyprinting library. git-svn-id: https://pandoc.googlecode.com/svn/trunk@965 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-30Rewrote LaTeX writer to use the prettyprinting library,fiddlosopher1-104/+130
so we get word wrapping, etc. git-svn-id: https://pandoc.googlecode.com/svn/trunk@964 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-30Fixed bug in LaTeX reader, which wrongly assumed that thefiddlosopher1-1/+1
roman numeral after "enum" in "setcounter" would consist entirely of "i"s. enumiv is legitimate. git-svn-id: https://pandoc.googlecode.com/svn/trunk@961 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-29Cleaned up LaTeX reader.fiddlosopher1-24/+24
Rearranged order of parsers in inline for slight speed improvement. Added ` to special characters and 'unescapedChar'. git-svn-id: https://pandoc.googlecode.com/svn/trunk@960 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-29Removed unneeded try's in RST reader; also minor code cleanup.fiddlosopher1-23/+17
git-svn-id: https://pandoc.googlecode.com/svn/trunk@959 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-29Efficiency improvements to RST reader (more than doubledfiddlosopher1-12/+9
speed): + removed tabchar + rearranged parsers in inline git-svn-id: https://pandoc.googlecode.com/svn/trunk@958 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-29Purely stylistic change.fiddlosopher1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@957 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-29Removed unneeded 'try' in 'ellipses'.fiddlosopher1-2/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@956 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-29+ Fixed bug introduced into referenceTitle by previous changes.fiddlosopher1-5/+6
Now it works as before. + Improved Markdown.pl-compatibility in referenceLink: the two parts of a reference-style link may be separated by one space, but not more... [a] [link], [not] [a link]. git-svn-id: https://pandoc.googlecode.com/svn/trunk@955 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-29Fixed markdown inline code parsing so it better accords withfiddlosopher1-4/+6
Markdown.pl: the marker for the end of the code section is a clump of the same number of `'s with which the section began, followed by a non-` character. So, for example, ` h ``` i ` -> <code>h ``` i</code>. git-svn-id: https://pandoc.googlecode.com/svn/trunk@954 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-29Small change to referenceTitle: should end with line-end, not ')'.fiddlosopher1-2/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@953 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-29Split 'title' into 'linkTitle' and 'referenceTitle', since thefiddlosopher1-14/+19
rules are slightly different. git-svn-id: https://pandoc.googlecode.com/svn/trunk@952 788f1e2b-df1e-0410-8736-df70ead52e1b