John MacFarlane
7f5130709b
RST reader: skip blanklines at beginning, not all leading spaces.
...
If you skip all spaces, it becomes impossible to start with
a blockquote.
2011-01-28 12:30:33 -08:00
John MacFarlane
5ba5373ec6
Shared: Make 'normalize' more generic.
...
Now it can transform an Inline, [Inline], Block, [Block], or Pandoc.
2011-01-28 09:35:43 -08:00
John MacFarlane
f90e18b955
RST reader: Skip blank space at beginning.
...
Resolves Debian Bug #611328 .
2011-01-28 08:52:54 -08:00
John MacFarlane
382564ed9e
RTF writer: Embed images when possible.
...
* Resolves Issue #275 .
* PNG and JPEG supported.
* Export rtfEmbedImage.
2011-01-28 08:42:04 -08:00
John MacFarlane
f8dca6ccbc
Add support for attributes in inline Code.
...
Additional related changes:
* URLs in Code in autolinks now use class "url".
* Require highlighting-kate 0.2.8.2, which omits the final <br/> tag,
essential for inline code.
2011-01-26 20:44:25 -08:00
John MacFarlane
703c421c9e
RST reader: Improved field lists.
...
Field lists now work properly with block content.
(Thanks to Lachlan Musicman for pointing out the bug.)
In addition, definition list items are now always Para instead
of Plain -- which matches behavior of rst2xml.py.
Finally, in image blocks, the alt attribute is parsed properly
and used for the alt, not also the title.
2011-01-26 17:23:57 -08:00
John MacFarlane
80f5a89a0b
LaTeX reader: Fixed an incomplete pattern match.
2011-01-26 17:23:56 -08:00
John MacFarlane
422bba202e
RST reader: Include line breaks in raw field list parser output.
...
Note: field list items can have lists, etc. as values.
2011-01-26 17:23:56 -08:00
John MacFarlane
e66cc6728c
RST reader: Allow spaces in field list names.
2011-01-26 17:23:56 -08:00
John MacFarlane
0cc7625d98
Adjusted writers to use "tex".
2011-01-26 17:23:56 -08:00
John MacFarlane
d3667f9aac
Markdown reader: Don't parse latex/context environments as inline.
2011-01-26 17:23:56 -08:00
John MacFarlane
eb26fa6f54
Distinguish latex & context environments; blank line after in writers.
2011-01-26 17:23:56 -08:00
John MacFarlane
bd43c0f4c9
Bumped version to 1.8; depend on pandoc-types 1.8.
...
The old TeX, HtmlInline and RawHtml elements have been removed
and replaced by generic RawInline and RawBlock elements.
All modules updated to use the new raw elements.
2011-01-26 17:22:53 -08:00
John MacFarlane
65a015e74b
Added needed space after .bc and .bq.
...
Otherwise these can trap a </dd>, for example.
Better solution to try next: rewrite using Pretty.
2011-01-23 10:08:11 -08:00
John MacFarlane
16d4366431
Textile writer: Don't escape code in bc. block.
2011-01-23 09:44:28 -08:00
John MacFarlane
38013de857
Textile writer: Don't HTML-escape between @'s.
2011-01-23 09:12:50 -08:00
John MacFarlane
628a1ef815
Textile reader: Fixed bug (swallowed p at beginning of paragraph).
...
The problem was a missing 'try' in the maybeExplicitBlock parser.
Test case, a paragraph beginning with 'p', has been added.
2011-01-23 08:59:35 -08:00
John MacFarlane
7234a79104
Textile writer: Use <pre> instead of bc.. for code with blank lines.
...
This has fewer interaction effects.
2011-01-23 08:49:55 -08:00
John MacFarlane
1d683be414
Textile reader: Support <tt> for inline code.
2011-01-23 00:25:05 -08:00
John MacFarlane
50d08ec2c3
Textile reader: Added code blocks with bc.
2011-01-23 00:05:35 -08:00
John MacFarlane
d562efa39d
ConTeXt writer: Ensure cr after \stoptyping.
2011-01-22 23:26:44 -08:00
John MacFarlane
ea5cd35004
Text.Pandoc: Added jsonFilter for easy construction of scripts.
...
Here's an example of its use:
-- removelinks.hs - removes links from document
import Text.Pandoc
main = interact $ jsonFilter $ bottomUp removeLink
removeLink :: Inline -> Inline
removeLink (Link xs _) = Emph xs
removeLink x = x
2011-01-22 17:53:16 -08:00
John MacFarlane
a74010a051
Markdown reader: slight speedup by moving whitespace parser.
2011-01-22 16:04:32 -08:00
John MacFarlane
a6d7d88b0f
RST reader: Big speed improvement (300->260ms).
...
Moved whitespace parser to top of inline parsers.
2011-01-22 16:01:42 -08:00
John MacFarlane
8dcc67a993
ConTeXt writer: Don't add cr at end of inline footnote.
2011-01-22 12:17:39 -08:00
John MacFarlane
5c35be1362
Make sure native output ends in newline with --standalone.
2011-01-21 09:58:23 -08:00
John MacFarlane
bfbc289871
Haddock comment improvements.
2011-01-21 09:00:05 -08:00
John MacFarlane
8894b1a030
Markdown writer: Avoid printing excess spaces at end if no notes/refs.
2011-01-20 22:36:08 -08:00
John MacFarlane
8011d079c8
Native writer: eliminated empty spaces in brackets.
2011-01-20 20:48:06 -08:00
John MacFarlane
6b50778b2a
Export readNative in Text.Pandoc.Shared.
2011-01-20 08:52:59 -08:00
John MacFarlane
810e3336dc
Improved native writer using Pretty.
...
2-3X speed improvement and more consistent layout.
2011-01-20 08:43:13 -08:00
John MacFarlane
978d949526
Made writeNative sensitive to writerStandalone.
...
The Pandoc (Meta ...) is not written unless standalone is set.
2011-01-19 18:57:25 -08:00
John MacFarlane
e1f3c6058e
Added Text.Pandoc.Readers.Native (readNative).
...
readNative can now read full pandoc documents, block lists, blocks,
inline lists, or inlines. It will interpret
Str "hi"
as if it were
Pandoc (Meta [] [] []) [Plain [Str "hi"]]
This should make testing easier.
2011-01-19 18:36:27 -08:00
John MacFarlane
e647f761ed
Use spaceChar instead of oneOf " \t" in rst reader.
2011-01-19 15:17:51 -08:00
John MacFarlane
1b8a9711b8
Replaced more noneOf/oneOf parsers.
2011-01-19 15:14:23 -08:00
John MacFarlane
a400cfe10f
Replaced uses of oneOf with more efficient parsers.
...
This speeds up the markdown reader.
2011-01-19 15:06:56 -08:00
John MacFarlane
c09518eefd
More small parser rewrites for small performance gains.
2011-01-19 14:59:59 -08:00
John MacFarlane
61f3db612c
Parsing: Rewrote spaceChar for significant speedup in readers.
2011-01-19 14:45:15 -08:00
John MacFarlane
adaae082fc
Fixed problem with inline code in ConTeXt writer.
...
Previously `}` would be rendered '\type{}}'.
Now we check the string for '}' and '{'. If it contains neither,
use \type{}; otherwise use \mono{} with an escaped version of the
string.
Note: There are some issues using the \type!str! form, including
differences btw mkii and mkiv. For now this is a conservative fix.
Perhaps in the future we can use \type!str!. See the discussion on
pandoc-discuss s.v. "Bug in context writer".
2011-01-19 11:53:00 -08:00
John MacFarlane
ab20da4be5
Support --chapters for ConTeXt output as well.
2011-01-16 09:08:19 -08:00
John MacFarlane
ece098b9e0
Use <chapter> for top docbook header if template has <book>.
...
Resolves Issue #265 .
2011-01-16 08:59:53 -08:00
John MacFarlane
9721b87c26
Added --chapters option affecting docbook and latex.
...
* Added writerChapters to WriterOptions.
* Added --chapters command-line option.
* --chapters causes top-level headers to be "chapter" instead of
"section" in LaTeX and DocBook.
* Resolves Issue #225 .
2011-01-16 08:58:29 -08:00
John MacFarlane
53eb2c4828
HTML writer: Add ids to <section> tags.
2011-01-15 22:35:25 -08:00
John MacFarlane
fd79417825
Fixed the parser for rst+lhs - set stateLiterateHaskell.
2011-01-14 22:38:02 -08:00
John MacFarlane
a5cbcdfe3a
HTML reader: parse simple tables.
...
Resolves Issue #106 . Thanks to Rodja Trappe for the idea
and some sample code.
2011-01-14 20:48:10 -08:00
John MacFarlane
c31d3cc306
HTML reader: parse location tags in pSatisfy.
...
This avoids the need for manual parsing all over the place.
2011-01-14 20:47:32 -08:00
John MacFarlane
9305114b9f
LaTeX writer: Escape strings in \href{..}.
...
Previously strings weren't escaped, so %5D would be interpreted
as a LaTeX comment!
2011-01-14 18:59:50 -08:00
John MacFarlane
5131589be0
Simplified Text.Pandoc.CharacterReferences by using TagSoup entity lookup
2011-01-14 18:28:54 -08:00
John MacFarlane
81403b8d80
LateX writer: In nonsimple tables, put cells in \parbox.
...
Otherwise we can get problems with linebreaks, and cell spacing
isn't right.
Thanks to Jef Allbright for pointing out the problem.
2011-01-14 14:45:04 -08:00
John MacFarlane
ba1d0d3070
Parsing: Fixed bug in grid table parser.
...
Spaces at end of line were not being stripped properly,
resulting in unintended LineBreaks.
2011-01-14 14:16:27 -08:00