aboutsummaryrefslogtreecommitdiff
path: root/src/Text
AgeCommit message (Collapse)AuthorFilesLines
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
2007-08-29Rewrote charsInBalanced and charsInBalanced'.fiddlosopher1-9/+9
- Documented restriction: open and close must be distinct characters. - Rearranged options for greater efficiency. - Changed inner call to charsInBalanced inside charsInBalanced' to charsInBalanced'. git-svn-id: https://pandoc.googlecode.com/svn/trunk@951 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-29Removed unneeded 'try' from noteMarker.fiddlosopher1-4/+1
git-svn-id: https://pandoc.googlecode.com/svn/trunk@950 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-29Minor reformatting.fiddlosopher1-3/+2
git-svn-id: https://pandoc.googlecode.com/svn/trunk@949 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-29Rewrote 'para' for greater efficiency.fiddlosopher1-6/+4
git-svn-id: https://pandoc.googlecode.com/svn/trunk@948 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-29Fixed bug in LaTeX writer: autolinks would not cause fiddlosopher1-5/+5
'\usepackage{url}' to be put in the document header. Also, changes to state in enumerated list items would be overwritten. git-svn-id: https://pandoc.googlecode.com/svn/trunk@947 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28Minor reformatting.fiddlosopher1-2/+2
git-svn-id: https://pandoc.googlecode.com/svn/trunk@946 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28Rewrote link parsers for greater efficiency.fiddlosopher1-7/+4
git-svn-id: https://pandoc.googlecode.com/svn/trunk@945 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28anyLine now requires that the line end with a newline (not eof).fiddlosopher1-1/+1
This is a harmless assumption, since we always add newlines to the end of a block before parsing with anyLine. Yields a 10% speed boost! git-svn-id: https://pandoc.googlecode.com/svn/trunk@944 788f1e2b-df1e-0410-8736-df70ead52e1b
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