aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
AgeCommit message (Collapse)AuthorFilesLines
2009-06-25Allow continuation lines in line blocks.fiddlosopher1-4/+5
Also added test cases for line blocks for RST reader. Resolves Issue #149. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1583 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-06-03Improved LaTeX reader's coverage of math modes.fiddlosopher1-3/+7
Remove displaymath* (which is not in LaTeX) and recognize all the amsmath environments that are alternatives to eqnarray, namely equation, equation*, gather, gather*, gathered, multline, multline*, align, align*, alignat, alignat*, aligned, alignedat, split Resolves Issue #103. Thanks to shreevatsa.public for the patch. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1577 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-05-04RST reader: Allow explicit links with spaces in URL: `link <to this>`_fiddlosopher1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1576 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-05-01Markdown reader: change ' ' to '\160' in abbreviations.fiddlosopher1-1/+2
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1571 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-04-30Markdown reader: improved efficiency of abbreviation parsing.fiddlosopher1-29/+26
Instead of a separate abbrev parser, we just check for abbreviations each time we parse a string. This gives a huge performance boost with -S. Resolves Issue #141. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1570 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-04-29Made htmlComment parser more efficient.fiddlosopher1-1/+3
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1567 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-04-29Improved efficiency of whitespace parser.fiddlosopher1-13/+8
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1565 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-04-29Use more efficient skipNonindentSpaces instead of nonidentSpaces where possible.fiddlosopher1-7/+16
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1564 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-04-29Took out unneeded 'try' in indentSpaces parser.fiddlosopher1-2/+2
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1563 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-01-31Gobble space after Plain blocks containing only raw html inline.fiddlosopher1-1/+1
Otherwise following header blocks are not parsed correctly, since the parser sees blank space before them. Resolves Issue #124. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1534 788f1e2b-df1e-0410-8736-df70ead52e1b
2009-01-24Moved all haskell source to src subdirectory.fiddlosopher5-0/+3632
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1528 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-29Moved everything from src into the top-level directory.fiddlosopher4-2704/+0
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1104 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-23Reverted changes in r1086 (implicit section header references).fiddlosopher1-93/+74
This caused too much of a performance hit. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1093 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-22Improved and simplified setextHeader parser in markdown reader.fiddlosopher1-8/+8
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1092 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-22Implemented implicit reference-style links to section headers in markdown.fiddlosopher1-75/+94
For example, if you have a header '# Supported architectures', you can link to it with '[Supported architectures]'. If there are multiple headers with this label, the link will point to the first of them. Implicit references are always overridden by explicitly specified references. Addresses Issue #20. + Moved isPunctuation, uniqueIdentifiers, and inlineListToIdentifier from Text.Pandoc.Writers.HTML to Text.Pandoc.Shared. + Added stHeaders to ParserState. This holds a list of header texts used in the document, and is used to construct implicit header references. + In Text.Pandoc.Readers.Markdown, added call to headerReference parser in initial parsing pass, constructing a list of section header labels. This is then passed to uniqueIdentifiers to produce identifiers, and a list of implicit references is constructed. This is added to the end of the explicitly specified references, so it will be overridden by explicitly specified references. All of this processing is skipped if --strict was specified. + Modified documentation in README. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1086 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-15Fixed logic in markdown smart quote parsing:fiddlosopher1-11/+14
+ Added some needed 'try' statements. + Unicode right single-quote can double as apostrophe, so treat it as a quote-end only when not followed by an alphanumeric character. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1077 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-15Fixed smart quote parsing in markdown reader so that unicodefiddlosopher1-6/+10
characters 8216 and 8217 are recognized as single quotes, and 8220 and 8221 as double quotes. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1075 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-10Fixed bug in LaTeX reader (pointed out by Mark Eli Kalderon):fiddlosopher1-1/+2
needed a "try" before "string" in parser for \[ math blocks. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1068 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-03Reverted back to state as of r1062. The template haskell changesfiddlosopher4-0/+2696
are more trouble than they're worth. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1064 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-03Use template haskell to avoid the need for templates:fiddlosopher4-2696/+0
+ 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-10-29Fixed bug in parsing files that begin with blank lines.fiddlosopher2-3/+5
+ 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-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-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-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-05Simplified parsing of reference keys and notes in markdown and RSTfiddlosopher2-33/+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-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-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