John MacFarlane
3e61333af0
Fixed regression in markdown reader.
...
'(_hi_)' was being parsed with literal underscores (no emphasis).
The fix: the 'str' parser now only parses alphanumerics and
embedded underscores. All other symbols are handled by the
'symbol' parser. This has a slight effect on the AST, since
you'll get [Str "hi",Str ":"] insntead of [Str "hi:"]. But there
should not be a visible effect in any of the writers.
Thanks to gwern for pointing out the regression.
2011-01-01 22:46:30 -08:00
John MacFarlane
0411f51433
Updated copyright notices.
2011-01-01 10:26:10 -08:00
John MacFarlane
ca7e81fd87
Updated pandoc-setup.iss.
2011-01-01 10:21:50 -08:00
John MacFarlane
a49e536fa1
New version of changelog based on relann draft.
2011-01-01 10:11:23 -08:00
John MacFarlane
a20e53ae04
Added early draft of release announcement for 1.7.
2011-01-01 10:10:57 -08:00
John MacFarlane
e9c1c1dccf
Documented -V fontsize= in markdown2pdf man page.
2011-01-01 10:10:31 -08:00
John MacFarlane
701cd71547
Updated changelog.
2011-01-01 08:40:30 -08:00
John MacFarlane
b05e739c6d
LaTeX reader: Allow ignored comments after \end{document}.
2010-12-30 22:05:19 -08:00
John MacFarlane
d6f28af9cb
HTML reader: Fixed some parsing bugs.
2010-12-30 19:33:37 -08:00
John MacFarlane
df0eecfc0e
More accurate benchmark for normalize.
2010-12-30 15:32:34 -08:00
Puneeth Chaganti
e4dedad1c0
Added support for listings package code blocks and inline code.
2010-12-30 14:37:51 -08:00
John MacFarlane
f49e60a8b8
Textile reader: Slight speed improvement.
2010-12-30 14:33:11 -08:00
John MacFarlane
904050fa36
New HTML reader using tagsoup as a lexer.
...
* The new reader is faster and more accurate.
* API changes for Text.Pandoc.Readers.HTML:
- removed rawHtmlBlock, anyHtmlBlockTag, anyHtmlInlineTag,
anyHtmlTag, anyHtmlEndTag, htmlEndTag, extractTagType,
htmlBlockElement, htmlComment
- added htmlTag, htmlInBalanced, isInlineTag, isBlockTag, isTextTag
* tagsoup is a new dependency.
* Text.Pandoc.Parsing: Generalized type on readWith.
* Benchmark.hs: Added length calculation to force full evaluation.
* Updated HTML reader tests.
* Updated markdown and textile readers to use the functions from
the HTML reader.
* Note: The markdown reader now correctly handles some cases it did not
before. For example:
<hr/>
is reproduced without adding a space.
<script>
a = '<b>';
</script>
is parsed correctly.
2010-12-30 13:55:40 -08:00
John MacFarlane
220fe5fab8
normalize: Don't reduce [Space] to [].
2010-12-26 12:01:33 -08:00
John MacFarlane
c912288eda
Improved 'normalize'.
...
Now normalizeInlines is split into consolidateInlines
and removeEmptyInlines. We need to remove empties before
consolidating.
2010-12-26 10:24:15 -08:00
John MacFarlane
249aa9e044
Markdown writer: Fixed bug in Image.
...
URI was getting unescaped twice!
2010-12-26 10:23:20 -08:00
John MacFarlane
87429ef2f2
Added normalize benchmark to Benchmark.hs.
2010-12-25 14:07:26 -08:00
John MacFarlane
82903cfaf3
Improved normalize.
2010-12-25 14:03:43 -08:00
John MacFarlane
10d85f8b0b
Use functions from Text.Pandoc.Generic instead of processWith(M).
2010-12-24 13:39:27 -08:00
John MacFarlane
b950503fd8
Added Interact.hs to make it easier to use ghci while developing.
...
Interact.hs loads ghci from the src directory, specifying
all the options needed to load pandoc modules (including
specific package dependencies, which it gets by parsing
dist/setup-config).
2010-12-22 21:06:23 -08:00
John MacFarlane
c08ca6fa6d
HTML reader: Simplified parsing of <script> sections.
...
I had previously assumed that we needed to ignore
</script> occuring in a string literal or javascript
comment. It turns out, though, that browsers aren't
that smart.
2010-12-22 19:20:27 -08:00
John MacFarlane
4bfe140ed1
Made --smart work with HTML reader.
...
It did not work before, because - and quotes were gobbled
up by the str parser.
2010-12-22 17:05:17 -08:00
John MacFarlane
63bf227e04
RST reader: Added unicode quote characters to specialChars.
...
(So they can trigger Quoted environments.)
2010-12-22 17:04:56 -08:00
John MacFarlane
bbad129066
RST reader: recouped speed loss due to addition of --smart.
...
This was achieved by rearranging the parsers in inline.
Benchmarks went from 500ms to 307ms -- not quite back to the
279ms we had in 1.6, before supporting smart punctuation and
footnotes, but close.
2010-12-22 15:10:21 -08:00
John MacFarlane
4ba3afbb4d
ODT writer: Don't wrap text in opendocument.
2010-12-22 14:55:59 -08:00
John MacFarlane
137dc85239
Added stats.sh, to make it easier to collect benchmark & loc info.
2010-12-22 14:13:47 -08:00
John MacFarlane
dc597a8a68
Removed all dependencies on 'pretty' package.
2010-12-22 11:48:08 -08:00
John MacFarlane
8e9c490b0a
Texinfo writer: Updated to use Pretty.
2010-12-22 11:43:43 -08:00
John MacFarlane
f15d479fc2
Shared: Removed unneeded prettyprinting functions:
...
wrapped, wrapIfNeeded, wrappedTeX, wrapTeXIfNeeded, hang'.
2010-12-22 00:34:36 -08:00
John MacFarlane
21d2d918ac
Shared: Removed BlockWrapper, wrappedBlocksToDoc.
...
These are no longer needed with the new Pretty module.
2010-12-22 00:28:20 -08:00
John MacFarlane
369502bbb4
Pretty: Added quote, doubleQuote.
2010-12-22 00:22:28 -08:00
John MacFarlane
fd07db16e9
Man writer: updated to use Pretty.
2010-12-22 00:22:13 -08:00
John MacFarlane
c904024944
OpenDocument writer: Updated to use Pretty.
2010-12-21 16:59:17 -08:00
John MacFarlane
e2548a1317
XML: don't use breaking spaces in attribute lists.
2010-12-21 16:46:21 -08:00
John MacFarlane
ebdbb06f94
Docbook writer: Updated to use Pretty.
2010-12-21 16:45:43 -08:00
John MacFarlane
ce533ffd90
Pretty: don't print a breaking space before a newline.
2010-12-21 16:45:13 -08:00
John MacFarlane
fe1152985c
Shared: Made splitBy take a test instead of an element.
2010-12-21 08:41:24 -08:00
John MacFarlane
4e446358d1
XML: Replaced escapeStringAsXML with a faster version.
...
Benchmarked with criterion, it's about 8x faster than
the old version. This speeds up docbook, opendocument,
and html writers.
2010-12-21 08:23:48 -08:00
John MacFarlane
6aa0a187b3
Added link to repo of CSL styles to README.
2010-12-20 19:41:31 -08:00
John MacFarlane
78cea94f45
Markdown writer: use \ for newline instead of two spaces at eol.
...
(Unless --strict.)
2010-12-20 19:36:40 -08:00
John MacFarlane
8889ae8b5b
Markdown writer: Use delimited code block if there are attributes.
...
(Unless in strict mode.)
2010-12-20 19:36:40 -08:00
John MacFarlane
0086329c36
Plain writer: set stateStrictMarkdown automatically.
2010-12-20 19:36:40 -08:00
John MacFarlane
2587543457
ConTeXt writer: Updated to use Text.Pandoc.Pretty.
2010-12-20 19:36:35 -08:00
John MacFarlane
112717de4e
Renamed 'enclosed' to 'inside'.
...
This avoids conflict with 'enclosed' in Text.Pandoc.Parsing.
2010-12-20 19:09:01 -08:00
John MacFarlane
2fe271d163
Pretty: Fixed parens.
2010-12-19 17:20:18 -08:00
John MacFarlane
71bc3789a3
Fixed markdown-citations.ieee.txt.
2010-12-19 12:43:25 -08:00
John MacFarlane
9fd45aaa2d
Fixed markdown-citations.txt.
2010-12-19 12:42:32 -08:00
John MacFarlane
9210b7ef69
Fixed biblatex/natbib citation writer tests.
2010-12-19 12:41:27 -08:00
John MacFarlane
9120514998
Pretty: Added enclosed, parens.
2010-12-19 12:39:49 -08:00
John MacFarlane
59cc27c10b
LaTeX writer: A bit of code polish.
2010-12-19 10:21:16 -08:00