Commit graph

854 commits

Author SHA1 Message Date
fiddlosopher
89ec99c383 Cleanup up Text.Pandoc.Shared to eliminate warnings
when compiling with -Wall.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@969 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-31 03:32:47 +00:00
fiddlosopher
1f9e61b95d Modified MacPorts Portfile:
+ depend on haddock
+ build and install libraries and library documentation
  in addition to the executable


git-svn-id: https://pandoc.googlecode.com/svn/trunk@968 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-30 23:28:22 +00:00
fiddlosopher
dcb1dd1ee4 Replaced individual wrapping routines in RST, Man, and
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-30 22:59:13 +00:00
fiddlosopher
7ff2706838 Removed extra blank lines at end of LaTeX writer tests.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@966 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-30 22:49:41 +00:00
fiddlosopher
33d47ced76 Added 'wrapped' function to Text.Pandoc.Shared.
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-30 22:49:20 +00:00
fiddlosopher
1827ab40c3 Rewrote LaTeX writer to use the prettyprinting library,
so we get word wrapping, etc.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@964 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-30 22:48:34 +00:00
fiddlosopher
18f150c020 Modified latex writer tests for new latex writer using prettyprinter.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@963 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-30 20:34:24 +00:00
fiddlosopher
8919f20abe Version bump to 0.43.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@962 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-30 19:16:12 +00:00
fiddlosopher
3b790b80f3 Fixed bug in LaTeX reader, which wrongly assumed that the
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-30 19:12:50 +00:00
fiddlosopher
14dc520669 Cleaned up LaTeX reader.
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-29 21:03:26 +00:00
fiddlosopher
451b426fd6 Removed unneeded try's in RST reader; also minor code cleanup.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@959 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-29 20:39:31 +00:00
fiddlosopher
2a37d8d30a Efficiency improvements to RST reader (more than doubled
speed):
+ removed tabchar
+ rearranged parsers in inline


git-svn-id: https://pandoc.googlecode.com/svn/trunk@958 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-29 20:22:24 +00:00
fiddlosopher
015644b60e Purely stylistic change.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@957 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-29 20:03:28 +00:00
fiddlosopher
7f8ec9577e Removed unneeded 'try' in 'ellipses'.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@956 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-29 19:59:08 +00:00
fiddlosopher
60f700997c + Fixed bug introduced into referenceTitle by previous changes.
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-29 19:57:01 +00:00
fiddlosopher
845a658aff Fixed markdown inline code parsing so it better accords with
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-29 16:38:41 +00:00
fiddlosopher
77f63605f5 Small change to referenceTitle: should end with line-end, not ')'.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@953 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-29 01:53:50 +00:00
fiddlosopher
21a2acaac9 Split 'title' into 'linkTitle' and 'referenceTitle', since the
rules are slightly different.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@952 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-29 01:51:03 +00:00
fiddlosopher
86cc8c8bf2 Rewrote charsInBalanced and charsInBalanced'.
- 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-29 01:50:36 +00:00
fiddlosopher
64023d8ba8 Removed unneeded 'try' from noteMarker.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@950 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-29 00:16:50 +00:00
fiddlosopher
40b870375d Minor reformatting.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@949 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-29 00:11:37 +00:00
fiddlosopher
3edf5834e8 Rewrote 'para' for greater efficiency.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@948 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-29 00:08:18 +00:00
fiddlosopher
902d6c7115 Fixed bug in LaTeX writer: autolinks would not cause
'\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-29 00:03:45 +00:00
fiddlosopher
5bafe2c9fb Minor reformatting.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@946 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28 22:44:01 +00:00
fiddlosopher
fcb91e8e51 Rewrote link parsers for greater efficiency.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@945 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28 22:41:05 +00:00
fiddlosopher
e407279b35 anyLine now requires that the line end with a newline (not eof).
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 21:17:08 +00:00
fiddlosopher
365c349249 Main: Replaced tabsToSpacesInLine and tabFilter with single function
tabFilter, which operates on the whole string rather than breaking
it into lines.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@943 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28 19:54:16 +00:00
fiddlosopher
8fdf8c1d4c + Removed tabsToSpaces and tabsInLine from Text.Pandoc.Shared.
(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-28 19:33:47 +00:00
fiddlosopher
cda7e7ac21 Removed redundant 'referenceLink' in definition of inline
(it's already in 'link').


git-svn-id: https://pandoc.googlecode.com/svn/trunk@940 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28 07:31:18 +00:00
fiddlosopher
6906584f47 Refactored escapeChar so it doesn't need 'try'.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@939 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28 07:24:56 +00:00
fiddlosopher
06a5a0e235 Removed unneeded 'try' in multilineRow.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@938 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28 07:22:21 +00:00
fiddlosopher
ce800f7121 Removed unneeded 'try' in dashedLine.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@937 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28 07:20:47 +00:00
fiddlosopher
3e337eb9c8 Removed unneeded try in rawHtmlBlocks (Markdown parser).
git-svn-id: https://pandoc.googlecode.com/svn/trunk@936 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28 07:19:07 +00:00
fiddlosopher
74dc62e730 Refactored hrule for performance in Markdown reader.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@935 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28 07:04:47 +00:00
fiddlosopher
8cf4971821 Minor reformatting.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@934 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28 06:59:57 +00:00
fiddlosopher
0c475bfd47 Refactored setext header parsing in Markdown reader for greater
speed.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@933 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28 06:58:20 +00:00
fiddlosopher
18b379c1ca More rearranging in definition of inline.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@932 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28 06:44:47 +00:00
fiddlosopher
b6ebe75656 More intelligent rearranging of 'inline' for speed boosts
in Text.Pandoc.Readers.Markdown.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@931 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28 06:38:38 +00:00
fiddlosopher
b94f541477 Removed unneeded 'try' from romanNumeral parser.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@930 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28 06:07:06 +00:00
fiddlosopher
6765fadd12 Use notFollowedBy instead of notFollowedBy' in charsInBalanced.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@929 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28 06:04:57 +00:00
fiddlosopher
f10ac4359c Removed unneeded 'try' in 'parseFromString'.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@928 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28 06:02:12 +00:00
fiddlosopher
da9271c258 Removed unneeded 'try' from stringAnyCase. (Now it behaves
like 'string'.)


git-svn-id: https://pandoc.googlecode.com/svn/trunk@927 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28 06:00:51 +00:00
fiddlosopher
f04df62db1 Changed definition of 'enclosed' in Text.Pandoc.Shared so that
'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-28 05:58:21 +00:00
fiddlosopher
a6da87f484 Minor code cleanup in Text.Pandoc.Shared.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@925 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28 03:06:05 +00:00
fiddlosopher
1d8fe2653a Performance improvements:
+ 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-28 02:33:53 +00:00
fiddlosopher
08fbfa37cc Removed unnecessary 'try' in 'anyLine' (Text.Pandoc.Shared).
git-svn-id: https://pandoc.googlecode.com/svn/trunk@923 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-28 02:31:17 +00:00
fiddlosopher
583536a138 Refactored Text.Pandoc.CharacterReferences.
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-28 02:30:38 +00:00
fiddlosopher
1ca8887a90 Added template item for md5 sum in Portfile.in.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@921 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-27 22:25:30 +00:00
fiddlosopher
76f918ad9f Updated Portfile.in to match the version in the MacPorts repository
(r28278 in MacPorts).


git-svn-id: https://pandoc.googlecode.com/svn/trunk@920 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-27 22:24:25 +00:00
fiddlosopher
6bf82d8f29 Removed local references to Portfile, since pandoc is now in the
MacPorts repository.  Updated INSTALL instructions and website.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@919 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-27 22:18:36 +00:00