Commit graph

27 commits

Author SHA1 Message Date
John MacFarlane
97c9691696 Textile reader: don't allow block HTML tags in inline contexts.
The reader previously did allow this, following redcloth,
which happily parses

    Html blocks can be <div>inlined</div> as well.

as

    <p>Html blocks can be <div>inlined</div> as well.</p>

This is invalid HTML, and this kind of thing can lead
to parsing problems (stack overflows) as well.  So this
commit undoes this behavior.  The above sample now produces;

    <p>Html blocks can be</p>
    <div>
    <p>inlined</p>
    </div>
    <p>as well.</p>
2016-01-02 22:34:06 -08:00
John MacFarlane
e917bcc124 Make raw_tex extension non-default for textile reader, writer.
Enable `raw_tex` extension in textile writer.

Closes #1532.
2014-08-14 09:49:31 -07:00
John MacFarlane
6fae136cbb Textile reader: list and HTML block parsing improvements.
Closes #1513.

Lists can now start without an intervening blank line.
Also, html block-level tags that don't start a line are parsed
as RawInline and don't interrupt paragraphs, as in RedCloth.
2014-08-11 11:22:39 -07:00
John MacFarlane
7b47042ae6 Textile reader: fixed list parsing bug. Closes #1500. 2014-08-08 12:18:47 -07:00
Matthew Pickering
90269cb213 Tests updated to reflect changes to readers.
Previously normalisation was handled by the `normalizeSpaces` function. The behavoir of the builder monoid is slightly different and melds together more items such as consecutive strings and spaces adjacent to line breaks. The tests have been changed to reflect this.

All relevant tests passed when the string melding line of the builder monoid was commented out.
2014-04-01 13:53:34 +01:00
John MacFarlane
50ba5a801a Textile reader: Correctly handle entities. 2013-06-11 10:16:54 -07:00
John MacFarlane
5e9145bb62 Textile reader: Handle attributes on headers.
Includes `[lang]`, `(class #id)`, `{color:red}` styles.
2013-02-16 18:29:12 -08:00
John MacFarlane
4cd573c61f Textile reader/writer: Fixed autolinks.
Previously the textile reader and writer incorrectly implented
RST-style autolinks for URLs and email addresses.

This has been fixed.  Now an autolink is done this way:

    "$":http://myurl.com
2012-11-06 16:05:17 -08:00
John MacFarlane
ea8b8114e1 Textile reader: Fixed bug with list items containing line breaks.
Now pandoc correctly handles hard line breaks inside list items.
Previously they broke list parsing.  Thanks to Pablo
Rodríguez for pointing out the problem.
2012-10-13 10:44:38 -07:00
John MacFarlane
f232034ab0 Textile reader: Implemented comment blocks. 2012-10-05 10:23:15 -07:00
John MacFarlane
b21363f1d5 Added (failing) test case for #518. 2012-08-25 22:11:31 -07:00
John MacFarlane
f68b05e74b Textile reader: properly handle links with surrounding brackets.
Square brackets need to be used when the link isn't surrounded by
spaces or punctuation, or when the URL ending may be ambiguous.

Closes #564.
2012-07-13 14:01:56 -07:00
paul.rivier
75cba828b5 Textile reader: fix for <notextile> and ==.
Closes #517.
2012-05-29 17:40:55 -07:00
paul.rivier
7b111542c0 textile reader improvements : better conformance to RedCloth Textile inlines 2012-04-24 15:56:59 +02:00
paul.rivier
411d54ce98 Textile reader quick clean-up and added support for LaTeX blocks and inlines. 2012-04-17 13:14:05 +02:00
Christoffer Sawicki
8fa4e8bff1 Textile reader: Make it possible to have colons after links. 2011-07-10 16:30:14 +02: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
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
paul.rivier
bb609a85e3 textile redcloth definition lists 2010-12-09 09:25:46 -08:00
John MacFarlane
f02080b62d Textile reader: Implemented footnotes. 2010-12-08 00:44:46 -08:00
John MacFarlane
f917b46500 Textile reader: implemented acronyms, (tm), (r), (c). 2010-12-07 18:28:36 -08:00
paul.rivier
c3866f3c66 punctuation handling, and more html-specific handling 2010-12-03 23:10:52 -08:00
Paul Rivier
d724c6b568 html inlines and html blocks handling in textile reader 2010-12-03 23:10:51 -08:00
Paul Rivier
fa0866886b textile reader now ignores html/css attributes 2010-12-03 23:10:51 -08:00
Paul Rivier
593b4f6c94 fix autolink by promoting it in the parser list, fix table parabreak 2010-12-03 23:10:51 -08:00
Paul Rivier
a7da0672dc more support for Textile reader (explicit links, images), tests and cabal entries 2010-12-03 23:10:51 -08:00