summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Textile.hs
Commit message (Collapse)AuthorAge
* Textile reader: Support `>`, `<`, `=`, `<>` text alignment attributes.John MacFarlane2016-01-25
| | | | Closes #2674.
* Textile reader: don't allow block HTML tags in inline contexts.John MacFarlane2016-01-02
| | | | | | | | | | | | | | | | | | | | | 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>
* new function to extract multiple properties at once in CSS.hsmb212015-12-13
| | | | and use it in Textile reader
* Textile Reader: image attributesmb212015-12-03
| | | | closes #2515
* Textile reader: skip over attribute in image source.John MacFarlane2015-11-16
| | | | | | | | We don't have a place yet for styles or sizes on images, but we can skip the attributes rather than incorrectly taking them to be part of the filename. Closes #2515.
* Restored Text.Pandoc.Compat.Monoid.John MacFarlane2015-11-09
| | | | | | | | | | | | | | Don't use custom prelude for latest ghc. This is a better approach to making 'stack ghci' and 'cabal repl' work. Instead of using NoImplicitPrelude, we only use the custom prelude for older ghc versions. The custom prelude presents a uniform API that matches the current base version's prelude. So, when developing (presumably with latest ghc), we don't use a custom prelude at all and hence have no trouble with ghci. The custom prelude no longer exports (<>): we now want to match the base 4.8 prelude behavior.
* Revert "Use -XNoImplicitPrelude and 'import Prelude' explicitly."John MacFarlane2015-11-09
| | | | This reverts commit c423dbb5a34c2d1195020e0f0ca3aae883d0749b.
* Use -XNoImplicitPrelude and 'import Prelude' explicitly.John MacFarlane2015-11-08
| | | | | | | This is needed for ghci to work with pandoc, given that we now use a custom prelude. Closes #2503.
* Textile reader: don't do smart punctuation unless explicitly asked.John MacFarlane2015-10-30
| | | | | | | | Closes #2480. Note that although smart punctuation is part of the textile spec, it's not always wanted when converting from textile to, say, Markdown. So it seems better to make this an option.
* Use custom Prelude to avoid compiler warnings.John MacFarlane2015-10-14
| | | | | | | | | | | | | - The (non-exported) prelude is in prelude/Prelude.hs. - It exports Monoid and Applicative, like base 4.8 prelude, but works with older base versions. - It exports (<>) for mappend. - It hides 'catch' on older base versions. This allows us to remove many imports of Data.Monoid and Control.Applicative, and remove Text.Pandoc.Compat.Monoid. It should allow us to use -Wall again for ghc 7.10.
* Removed tab chars in Textile reader source.John MacFarlane2015-05-28
|
* Updated copyright notices to -2015. Closes #2111.John MacFarlane2015-04-26
|
* Change return type of Textile readerMatthew Pickering2015-02-18
|
* Textile reader: table improvements.John MacFarlane2015-02-02
| | | | | | * Handle newlines in cells. * Handle empty cells. * Closes #1919.
* Textile reader: list and HTML block parsing improvements.John MacFarlane2014-08-11
| | | | | | | | 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.
* Textile reader: fixed list parsing bug. Closes #1500.John MacFarlane2014-08-08
|
* Textile reader: don't allow inline formatting to extend over newline.John MacFarlane2014-08-08
| | | | | This matches behavior of RedCarpet, avoids some ugly bugs, and improves performance.
* Update copyright notices for 2014, add missing noticesAlbert Krewinkel2014-05-09
|
* Small improvement to textile reader fix. Removed 'try'.mpickering2014-05-07
|
* Fix textile reader hanging.mpickering2014-05-07
| | | | | | | | Textile reader hung on pandoc -f textile http://johnmacfarlane.net/pandoc/demo/example25.textile The reader no longer hangs.
* Textile reader: Rearranged inline parsers for performance.John MacFarlane2014-05-06
| | | | | This is possible because of the rewrite of simpleInline. Also removed a redundant parser for grouped inlines.
* Textile reader: Rewrote simpleInline for clarity and efficiency.John MacFarlane2014-05-06
| | | | This way we only look once for the opening `[`.
* Textile reader: Disallow blank lines in inline contexts.John MacFarlane2014-05-06
| | | | | | | | @hi there@ should not be a single code span.
* Make `--trace` work with textile reader.John MacFarlane2014-05-06
|
* Textile reader: Rewrote some inline parsing code for clarity.John MacFarlane2014-05-06
| | | | | | (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.)
* Textile reader: Improved link parsing.John MacFarlane2014-04-07
| | | | | | | | 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.
* Textile reader: Better support for attributes.John MacFarlane2014-04-05
| | | | | | | | | | 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.
* Textile reader: Improved treatment of HTML spans (%).John MacFarlane2014-04-05
| | | | Closes #1115.
* Removed whitespace at ends of lines.John MacFarlane2014-04-05
|
* Changed the smart punctuation parser to return Inlines rather than an Inline ↵Matthew Pickering2014-04-01
| | | | element and updated files accordingly
* Bugfix for #1175 and convert textile reader to use builder.Matthew Pickering2014-04-01
| | | | | | | | | | | | | | | 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.
* HLint: redundant parensHenry de Valence2013-12-19
| | | | Remove parens enclosing a single element.
* Use registerHeader in Textile reader.John MacFarlane2013-09-01
| | | | | | | This produces automatic header identifiers, unless `auto_identifiers` extension is disabled. Closes #967.
* Adjustments for new Format newtype.John MacFarlane2013-08-10
|
* Revert "Textile reader: Removed raw LaTeX parsing."John MacFarlane2013-08-08
| | | | | | This reverts commit bb61624bb2bba416e1992ecdf101f9660a3edcae. Apparently someone put this there for a reason, since it's in the test suite.
* Textile reader: Removed raw LaTeX parsing.John MacFarlane2013-08-07
| | | | This isn't part of Textile.
* Textile reader: Improved handling of `<pre>` blocks.John MacFarlane2013-07-25
| | | | | | | | * 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.
* Use new flexible metadata type.John MacFarlane2013-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Textile reader: Correctly handle entities.John MacFarlane2013-06-11
|
* Textile reader: Handle attributes on headers.John MacFarlane2013-02-16
| | | | Includes `[lang]`, `(class #id)`, `{color:red}` styles.
* Added Attr field to Header.John MacFarlane2013-01-09
| | | | | | | | | | 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.
* Textile reader/writer: Fixed autolinks.John MacFarlane2012-11-06
| | | | | | | | | 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
* Textile parser: Expanded list of stringBreakers.John MacFarlane2012-11-06
| | | | | | | 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.
* Textile reader: Allow newlines before pipes in table.John MacFarlane2012-11-05
| | | | Closes #654.
* Textile reader: Fixed bug with list items containing line breaks.John MacFarlane2012-10-13
| | | | | | 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.
* Textile reader: Implemented comment blocks.John MacFarlane2012-10-05
|
* Textile reader: Avoid parsing dashes as strikeout.John MacFarlane2012-09-28
| | | | | | | | | | | | | | | 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.
* Textile reader: Fixed bug affected words ending in hyphen.John MacFarlane2012-09-28
| | | | | Note: sepBy1 doesn't work quite as I expected. It gives odd results if sep succeeds but not p.
* Textile: Improvements to surround and symbol.John MacFarlane2012-09-28
|
* Removed nullBlock.John MacFarlane2012-09-27
| | | | | Don't use nullBlock in Textile reader. Better to know about parsing problems than to skip stuff when we get stuck.