aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
AgeCommit message (Collapse)AuthorFilesLines
2007-08-28+ Removed tabsToSpaces and tabsInLine from Text.Pandoc.Shared.fiddlosopher1-22/+0
(They were used only in Main.) + Wrote new tabsToSpacesInLine function in Main that changes tabs to spaces and removes DOS line-endings in one pass, for a slight speed improvement. git-svn-id: https://pandoc.googlecode.com/svn/trunk@942 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28Removed redundant 'referenceLink' in definition of inlinefiddlosopher1-1/+0
(it's already in 'link'). git-svn-id: https://pandoc.googlecode.com/svn/trunk@940 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28Refactored escapeChar so it doesn't need 'try'.fiddlosopher1-4/+4
git-svn-id: https://pandoc.googlecode.com/svn/trunk@939 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28Removed unneeded 'try' in multilineRow.fiddlosopher1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@938 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28Removed unneeded 'try' in dashedLine.fiddlosopher1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@937 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28Removed unneeded try in rawHtmlBlocks (Markdown parser).fiddlosopher1-2/+2
git-svn-id: https://pandoc.googlecode.com/svn/trunk@936 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28Refactored hrule for performance in Markdown reader.fiddlosopher1-5/+5
git-svn-id: https://pandoc.googlecode.com/svn/trunk@935 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28Minor reformatting.fiddlosopher1-2/+3
git-svn-id: https://pandoc.googlecode.com/svn/trunk@934 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28Refactored setext header parsing in Markdown reader for greaterfiddlosopher1-5/+3
speed. git-svn-id: https://pandoc.googlecode.com/svn/trunk@933 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28More rearranging in definition of inline.fiddlosopher1-8/+8
git-svn-id: https://pandoc.googlecode.com/svn/trunk@932 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28More intelligent rearranging of 'inline' for speed boostsfiddlosopher1-3/+3
in Text.Pandoc.Readers.Markdown. git-svn-id: https://pandoc.googlecode.com/svn/trunk@931 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28Removed unneeded 'try' from romanNumeral parser.fiddlosopher1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@930 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28Use notFollowedBy instead of notFollowedBy' in charsInBalanced.fiddlosopher1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@929 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28Removed unneeded 'try' in 'parseFromString'.fiddlosopher1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@928 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28Removed unneeded 'try' from stringAnyCase. (Now it behavesfiddlosopher1-2/+2
like 'string'.) git-svn-id: https://pandoc.googlecode.com/svn/trunk@927 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28Changed definition of 'enclosed' in Text.Pandoc.Shared so thatfiddlosopher4-7/+7
'try' is not automatically applied to the 'end' parser. Added 'try' in calls to 'enclosed' where needed. Slight speed increase. git-svn-id: https://pandoc.googlecode.com/svn/trunk@926 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28Minor code cleanup in Text.Pandoc.Shared.fiddlosopher1-4/+7
git-svn-id: https://pandoc.googlecode.com/svn/trunk@925 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28Performance improvements:fiddlosopher1-13/+11
+ Rearranged parsers in definition of 'inline' so that the most frequently used would (by and large) be tried first. + Removed some unneeded 'try's. + Removed tabchar parser, as whitespace handles tabs anyway. + All in all, these changes, together with the last two commits, cut almost in half the time it takes pandoc to parse a large test file. git-svn-id: https://pandoc.googlecode.com/svn/trunk@924 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28Removed unnecessary 'try' in 'anyLine' (Text.Pandoc.Shared).fiddlosopher1-2/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@923 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28Refactored Text.Pandoc.CharacterReferences.fiddlosopher1-279/+271
Removed unnecessary 'try's for a speed improvement. Removed unnecessary '&' and ';' from the entity table. git-svn-id: https://pandoc.googlecode.com/svn/trunk@922 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-26Don't countfiddlosopher1-0/+1
p. 27 at the beginning of a line as an ordered list start, since it's most likely a page number. git-svn-id: https://pandoc.googlecode.com/svn/trunk@900 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-25Fixed bug in LaTeX writer. When a footnote ends with a Verbatimfiddlosopher1-1/+3
environment, the close } of the footnote needs to occur on the same line or an error occurs. Fixed by adding a newline before the close } in every footnote. git-svn-id: https://pandoc.googlecode.com/svn/trunk@897 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-23Removed incorrect "{}" around style information infiddlosopher1-2/+2
HTML tables. Adjusted test suite accordingly. Column widths now work properly in HTML. git-svn-id: https://pandoc.googlecode.com/svn/trunk@882 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-23Added new rule for enhanced markdown ordered lists: if the list markerfiddlosopher1-6/+9
is a capital letter followed by a period (including a single-letter capital roman numeral), then it must be followed by at least two spaces. The point of this is to avoid accidentally treating people's initials as list markers: a paragraph may begin: B. Russell was an English philosopher. and this shouldn't be treated as a list. Modified Markdown reader and README documentation. Added a test case. git-svn-id: https://pandoc.googlecode.com/svn/trunk@880 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-22Added a needed 'try' to listItem in Markdown reader.fiddlosopher1-1/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@878 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-20Code cleanup in Markdown reader.fiddlosopher1-27/+18
git-svn-id: https://pandoc.googlecode.com/svn/trunk@877 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-20Changes to Markdown reader for better conformity to thefiddlosopher1-6/+12
Markdown test suite under --strict: + Removed check for a following setext header in endline. A full test is too inefficient (doubles benchmark time), and the substitute we had before is not 100% accurate. + Don't use Code elements for autolinks if --strict specified. git-svn-id: https://pandoc.googlecode.com/svn/trunk@876 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-20If --strict and not --toc, don't include identifiers in headers.fiddlosopher1-1/+3
git-svn-id: https://pandoc.googlecode.com/svn/trunk@875 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-19Refactor RST and Markdown readers using parseFromString.fiddlosopher2-28/+7
git-svn-id: https://pandoc.googlecode.com/svn/trunk@864 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-19Added a necessary "try" in definition of "para"fiddlosopher1-1/+2
(HTML reader). git-svn-id: https://pandoc.googlecode.com/svn/trunk@863 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-18Bug fixes in readers:fiddlosopher2-7/+20
+ LaTeX reader: skip anything after \end{document} + HTML reader: fixed bug skipping material after </html> -- previously, stuff at the end was skipped even if no </html> was present, which meant only part of the file would be parsed and no error issued + HTML reader: added new constant eitherBlockOrInline with elements that may count either as block-level or inline + Modified isInline and isBlock to take this into account + modified rawHtmlBlock to accept any tag (even an inline tag); this is innocuous, because rawHtmlBlock is tried only if a regular inline element can't be parsed. git-svn-id: https://pandoc.googlecode.com/svn/trunk@862 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-18+ Fixed bug in markdown ordered list parsing. The problem wasfiddlosopher2-4/+6
that anyOrderedListStart did not check for a space following the ordered list marker. So, 'A.B. 2007' would be parsed as a list item, then fail because of the lack of space after 'A.' (required by orderedListStart). Resolves Issue #22. + Fixed a similar problem in RST reader. + Added regression test. git-svn-id: https://pandoc.googlecode.com/svn/trunk@861 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-17Fixed block quote output in markdown writer: previously,fiddlosopher1-4/+4
block quotes in notes would be indented only in the first line. git-svn-id: https://pandoc.googlecode.com/svn/trunk@859 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-15Cosmetic changes.fiddlosopher1-4/+3
git-svn-id: https://pandoc.googlecode.com/svn/trunk@851 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-15LaTeX reader: parse \texttt{} as code, as long as there'sfiddlosopher1-2/+9
nothing fancy inside. git-svn-id: https://pandoc.googlecode.com/svn/trunk@846 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-15Fixed bug in normalizeSpaces: Space:Str "":Spacefiddlosopher1-0/+1
should compress to Space. git-svn-id: https://pandoc.googlecode.com/svn/trunk@845 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-15Allow htmlComments as rawHtmlInline in HTML reader.fiddlosopher1-2/+3
git-svn-id: https://pandoc.googlecode.com/svn/trunk@844 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-15Major code cleanup in all modules. (Removed unneeded imports,fiddlosopher17-2245/+1915
reformatted, etc.) More major changes are documented below: + Removed Text.Pandoc.ParserCombinators and moved all its definitions to Text.Pandoc.Shared. + In Text.Pandoc.Shared: - Removed unneeded 'try' in blanklines. - Removed endsWith function and rewrote functions to use isSuffixOf instead. - Added >>~ combinator. - Rewrote stripTrailingNewlines, removeLeadingSpaces. + Moved Text.Pandoc.Entities -> Text.Pandoc.CharacterReferences. - Removed unneeded functions charToEntity, charToNumericalEntity. - Renamed functions using proper terminology (character references, not entities). decodeEntities -> decodeCharacterReferences, characterEntity -> characterReference. - Moved escapeStringToXML to Docbook writer, which is the only thing that uses it. - Removed old entity parser in HTML and Markdown readers; replaced with new charRef parser in Text.Pandoc.Shared. + Fixed accent bug in Text.Pandoc.Readers.LaTeX: \^{} now correctly parses as a '^' character. + Text.Pandoc.ASCIIMathML is no longer an exported module. git-svn-id: https://pandoc.googlecode.com/svn/trunk@835 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-08Major change in the way ordered lists are handled:fiddlosopher15-177/+493
+ The changes are documented in README, under Lists. + The OrderedList block element now stores information about list number style, list number delimiter, and starting number. + The readers parse this information, when possible. + The writers use this information to style ordered lists. + Test suites have been changed accordingly. Motivation: It's often useful to start lists with numbers other than 1, and to have control over the style of the list. Added to Text.Pandoc.Shared: + camelCaseToHyphenated + toRomanNumeral + anyOrderedListMarker + orderedListMarker + orderedListMarkers Added to Text.Pandoc.ParserCombinators: + charsInBalanced' + withHorizDisplacement + romanNumeral RST writer: + Force blank line before lists, so that sublists will be handled correctly. LaTeX reader: + Fixed bug in parsing of footnotes containing multiple paragraphs, introduced by use of charsInBalanced. Fix: use charsInBalanced' instead. LaTeX header: + use mathletters option in ucs package, so that basic unicode Greek letters will work properly. git-svn-id: https://pandoc.googlecode.com/svn/trunk@834 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-03Added parsing for \url to LaTeX reader.fiddlosopher1-1/+6
git-svn-id: https://pandoc.googlecode.com/svn/trunk@833 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-03Use \url{} for autolinks in LaTeX writer.fiddlosopher1-2/+5
git-svn-id: https://pandoc.googlecode.com/svn/trunk@832 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28Changes to Markdown reader:fiddlosopher1-6/+7
+ added try to def of indentSpaces + in def of 'reference', check to make sure it's not a note reference first. git-svn-id: https://pandoc.googlecode.com/svn/trunk@827 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28Removed examplep specific stuff in LaTeX reader.fiddlosopher1-13/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@826 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28LaTeX writer:fiddlosopher1-12/+14
+ No longer using examplep (too many quirks, too hard to install) + Instead, using deVerb function for environments that don't support \verb + And fancyvrb for footnotes and verbatim environments in footnotes. + Add fancyvrb to header if Code inline occurs in a footnote. git-svn-id: https://pandoc.googlecode.com/svn/trunk@825 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28Cleaned up and fixed autolinks in RST. All that's neededfiddlosopher1-12/+12
is a bare email address or URL. This is now handled with a separate matching clause in the definition of inlineToRST, rather than with conditionals. git-svn-id: https://pandoc.googlecode.com/svn/trunk@821 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28Don't put autolinks in typewriter font in ConTeXt, sincefiddlosopher1-0/+2
ConTeXt has its own way of printing links. git-svn-id: https://pandoc.googlecode.com/svn/trunk@820 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28Fixed problems with obfuscateLink introduced by last roundfiddlosopher1-14/+11
of changes. Changed type so that text parameter is String, not HTML, which allows easier testing for autolinks. git-svn-id: https://pandoc.googlecode.com/svn/trunk@819 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28Changes in LaTeX reader to accommodate Pandoc's own use offiddlosopher1-2/+23
examplep. git-svn-id: https://pandoc.googlecode.com/svn/trunk@818 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28Man page writer: modified treatment of autolinks,fiddlosopher1-1/+1
in accord with recent change from Str to Code. git-svn-id: https://pandoc.googlecode.com/svn/trunk@816 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28LaTeX writer: include fancyvrb and \VerbatimFootnotesfiddlosopher1-4/+4
line in header only if absolutely needed -- that is, only if there is actually a code block in a footnote. git-svn-id: https://pandoc.googlecode.com/svn/trunk@815 788f1e2b-df1e-0410-8736-df70ead52e1b