aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Textile.hs
AgeCommit message (Collapse)AuthorFilesLines
2015-05-28Removed tab chars in Textile reader source.John MacFarlane1-2/+2
2015-04-26Updated copyright notices to -2015. Closes #2111.John MacFarlane1-2/+2
2015-02-18Change return type of Textile readerMatthew Pickering1-1/+2
2015-02-02Textile reader: table improvements.John MacFarlane1-16/+14
* Handle newlines in cells. * Handle empty cells. * Closes #1919.
2014-08-11Textile reader: list and HTML block parsing improvements.John MacFarlane1-16/+13
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-08Textile reader: fixed list parsing bug. Closes #1500.John MacFarlane1-5/+16
2014-08-08Textile reader: don't allow inline formatting to extend over newline.John MacFarlane1-1/+2
This matches behavior of RedCarpet, avoids some ugly bugs, and improves performance.
2014-05-09Update copyright notices for 2014, add missing noticesAlbert Krewinkel1-2/+3
2014-05-07Small improvement to textile reader fix. Removed 'try'.mpickering1-1/+1
2014-05-07Fix textile reader hanging.mpickering1-1/+2
Textile reader hung on pandoc -f textile http://johnmacfarlane.net/pandoc/demo/example25.textile The reader no longer hangs.
2014-05-06Textile reader: Rearranged inline parsers for performance.John MacFarlane1-4/+3
This is possible because of the rewrite of simpleInline. Also removed a redundant parser for grouped inlines.
2014-05-06Textile reader: Rewrote simpleInline for clarity and efficiency.John MacFarlane1-15/+7
This way we only look once for the opening `[`.
2014-05-06Textile reader: Disallow blank lines in inline contexts.John MacFarlane1-11/+20
@hi there@ should not be a single code span.
2014-05-06Make `--trace` work with textile reader.John MacFarlane1-2/+12
2014-05-06Textile reader: Rewrote some inline parsing code for clarity.John MacFarlane1-12/+8
(It seems clearer to put the whitespace parsing in the grouped parser. This also uses stateLastStrPos to determine when the border is adjacent to an alphanumeric.)
2014-04-07Textile reader: Improved link parsing.John MacFarlane1-19/+15
In particular we now pick up on attributes. Since pandoc links can't have attributes, we enclose the whole link in a span if there are attributes. Closes #1008.
2014-04-05Textile reader: Better support for attributes.John MacFarlane1-9/+12
Instead of being ignored, attributes are now parsed and included in Span inlines. The output will be a bit different from stock textile: e.g. for `*(foo)hi*`, we'll get `<em><span class="foo">hi</span></em>` instead of `<em class="foo">hi</em>`. But at least the data is not lost.
2014-04-05Textile reader: Improved treatment of HTML spans (%).John MacFarlane1-5/+1
Closes #1115.
2014-04-05Removed whitespace at ends of lines.John MacFarlane1-15/+15
2014-04-01Changed the smart punctuation parser to return Inlines rather than an Inline ↵Matthew Pickering1-3/+1
element and updated files accordingly
2014-04-01Bugfix for #1175 and convert textile reader to use builder.Matthew Pickering1-134/+167
The reader did not correctly parse inline markup. The behavoir is now as follows. (a) The markup must start at the start of a line, be inside previous inline markup or be preceeded by whitespace. (b) The markup can not span across paragraphs (delimited by \n\n) (c) The markup can not be followed by a alphanumeric character. (d) Square brackets can be placed around the markup to avoid having to have white space before it. In order to make these changes it was either necessary to convert the parser to return a list of inlines or to convert the whole reader to use the builder. The latter approach whilst more work makes a bit more sense as it becomes easy to arbitarily append and prepend elements without changing the type. Tests are accordingly updated in a later commit to reflect the different normalisation behavoir specified by the builder monoid.
2013-12-19HLint: redundant parensHenry de Valence1-1/+1
Remove parens enclosing a single element.
2013-09-01Use registerHeader in Textile reader.John MacFarlane1-1/+3
This produces automatic header identifiers, unless `auto_identifiers` extension is disabled. Closes #967.
2013-08-10Adjustments for new Format newtype.John MacFarlane1-3/+3
2013-08-08Revert "Textile reader: Removed raw LaTeX parsing."John MacFarlane1-0/+16
This reverts commit bb61624bb2bba416e1992ecdf101f9660a3edcae. Apparently someone put this there for a reason, since it's in the test suite.
2013-08-07Textile reader: Removed raw LaTeX parsing.John MacFarlane1-16/+0
This isn't part of Textile.
2013-07-25Textile reader: Improved handling of `<pre>` blocks.John MacFarlane1-4/+10
* Closed #927 (a bug in which `<pre>` in certain contexts was not recognized as a code block). * Remove internal HTML tags in code blocks, rather than printing them verbatim. * Parse attributes on `<pre>` tag for code blocks.
2013-06-24Use new flexible metadata type.John MacFarlane1-1/+1
* Depend on pandoc 1.12. * Added yaml dependency. * `Text.Pandoc.XML`: Removed `stripTags`. (API change.) * `Text.Pandoc.Shared`: Added `metaToJSON`. This will be used in writers to create a JSON object for use in the templates from the pandoc metadata. * Revised readers and writers to use the new Meta type. * `Text.Pandoc.Options`: Added `Ext_yaml_title_block`. * Markdown reader: Added support for YAML metadata block. Note that it must come at the beginning of the document. * `Text.Pandoc.Parsing.ParserState`: Replace `stateTitle`, `stateAuthors`, `stateDate` with `stateMeta`. * RST reader: Improved metadata. Treat initial field list as metadata when standalone specified. Previously ALL fields "title", "author", "date" in field lists were treated as metadata, even if not at the beginning. Use `subtitle` metadata field for subtitle. * `Text.Pandoc.Templates`: Export `renderTemplate'` that takes a string instead of a compiled template.. * OPML template: Use 'for' loop for authors. * Org template: '#+TITLE:' is inserted before the title. Previously the writer did this.
2013-06-11Textile reader: Correctly handle entities.John MacFarlane1-1/+2
2013-02-16Textile reader: Handle attributes on headers.John MacFarlane1-15/+32
Includes `[lang]`, `(class #id)`, `{color:red}` styles.
2013-01-09Added Attr field to Header.John MacFarlane1-2/+7
Previously header ids were autogenerated by the writers. Now they are generated (unless supplied explicitly) in the markdown parser, if the `header_identifiers` extension is selected. In addition, the textile reader now supports id attributes on headers.
2012-11-06Textile reader/writer: Fixed autolinks.John MacFarlane1-11/+5
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-06Textile parser: Expanded list of stringBreakers.John MacFarlane1-1/+1
This fixes a bug on input like "(_hello_)" which should be a parenthesized emphasized "hello". The new list is taken from the PHP source of textile 2.4.
2012-11-05Textile reader: Allow newlines before pipes in table.John MacFarlane1-1/+2
Closes #654.
2012-10-13Textile reader: Fixed bug with list items containing line breaks.John MacFarlane1-9/+15
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-05Textile reader: Implemented comment blocks.John MacFarlane1-0/+7
2012-09-28Textile reader: Avoid parsing dashes as strikeout.John MacFarlane1-1/+1
Previously the input text-- text-- text-- text-- would be parsed with strikeouts rather than dashes. This fixes the problem by requiring that a strikeout delimiting - not be followed by a -. Closes #631.
2012-09-28Textile reader: Fixed bug affected words ending in hyphen.John MacFarlane1-2/+5
Note: sepBy1 doesn't work quite as I expected. It gives odd results if sep succeeds but not p.
2012-09-28Textile: Improvements to surround and symbol.John MacFarlane1-2/+2
2012-09-27Removed nullBlock.John MacFarlane1-1/+1
Don't use nullBlock in Textile reader. Better to know about parsing problems than to skip stuff when we get stuck.
2012-09-06Textile reader: Improved speed of hyphenedWords.John MacFarlane1-4/+6
This speeds up the textile reader by about a factor of 4. But the reader is still very slow, compared to others readers.
2012-09-06Removed obsolete comment.John MacFarlane1-1/+0
2012-09-06Fixed footnotes bug in textile.John MacFarlane1-2/+3
This affected notes occuring before punctuation, e.g. `foo[1].`. Closes #518.
2012-07-26Fixed whitespace errors.John MacFarlane1-12/+12
2012-07-26Textile reader: Replace failIfStrict with guardEnabled.John MacFarlane1-3/+3
2012-07-25Changed reader parameters from ParserState to ReaderOptions.John MacFarlane1-8/+8
2012-07-25Moved stateOldDashes to readerOldDashes in ReaderOptions.John MacFarlane1-4/+6
2012-07-25Moved ParseRaw from ParserState to ReaderOptions.John MacFarlane1-3/+3
2012-07-25Options -> ReaderOptions.John MacFarlane1-1/+1
Better to keep reader and writer options separate.
2012-07-25Put smart, strict in separate options field in state.John MacFarlane1-1/+5
This is the beginning of a larger transition that will make Options, not ParserState, the parameter of the read functions. (Options will also be used in writers, in place of WriterOptions.) Next step is to remove strict, replacing it with granular tests for different extensions.