aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/Txt2Tags.hs
AgeCommit message (Collapse)AuthorFilesLines
2017-01-27Shared: rename compactify', compactify'DL -> compactify, compactifyDL.John MacFarlane1-4/+4
2017-01-25Removed `--normalize` option and normalization functions from Shared.John MacFarlane1-2/+6
* Removed normalize, normalizeInlines, normalizeBlocks from Text.Pandoc.Shared. These shouldn't now be necessary, since normalization is handled automatically by the Builder monoid instance. * Remove `--normalize` command-line option. * Don't use normalize in tests. * A few revisions to readers so they work well without normalize.
2017-01-25Readers: pass errors straight up to PandocMonad.Jesse Rosenthal1-2/+1
Since we've unified error types, we can just throw the same error at the toplevel.
2017-01-25Unify Errors.Jesse Rosenthal1-1/+2
2017-01-25Add Text2Tags to Text.PandocJesse Rosenthal1-3/+3
2017-01-25Working on readers.Jesse Rosenthal1-15/+30
2016-09-02Remove directory compatJesse Rosenthal1-1/+1
directory 1.1 depends on base 4.5 (ghc 7.4) which we are no longer supporting. So we don't have to use a compatibility layer for it.
2016-09-02Remove Compat.MonoidJesse Rosenthal1-1/+1
This was only necessary for GHC versions with base below 4.5 (i.e., ghc < 7.4).
2016-07-14Fixed compiler warnings.John MacFarlane1-1/+1
2015-12-12Modified readers to emit SoftBreak when appropriate.John MacFarlane1-1/+1
2015-11-09Restored Text.Pandoc.Compat.Monoid.John MacFarlane1-0/+1
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.
2015-11-09Revert "Use -XNoImplicitPrelude and 'import Prelude' explicitly."John MacFarlane1-1/+0
This reverts commit c423dbb5a34c2d1195020e0f0ca3aae883d0749b.
2015-11-08Use -XNoImplicitPrelude and 'import Prelude' explicitly.John MacFarlane1-0/+1
This is needed for ghci to work with pandoc, given that we now use a custom prelude. Closes #2503.
2015-10-14More changes to avoid compiler warnings on ghc 7.10.John MacFarlane1-1/+1
* CPP around deprecated `parseTime`. * Text.Pandoc.Compat.Locale -> Text.Pandoc.Compat.Time, now exports Data.Time.
2015-10-14Use custom Prelude to avoid compiler warnings.John MacFarlane1-4/+1
- 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.
2015-02-18Change return type of Txt2Tags readerMatthew Pickering1-2/+3
2014-12-19Added Text.Pandoc.Compat.Locale to assist with transition to time 1.5.John MacFarlane1-2/+1
2014-08-21Txt2Tags Reader: Fixed crash when reading from stdinmpickering1-3/+5
2014-08-21Txt2Tags Reader: Corrected formatting of %%mtime macrompickering1-1/+1
2014-08-21Txt2Tags Reader: Parse Meta informationmpickering1-10/+36
The header is now parsed as meta information. The first line is the `title`, the second is the `author` and third line is the `date`.
2014-08-20Txt2Tags reader: Header is now parsed only if standalone flag is setmpickering1-1/+4
2014-07-30getT2TMeta: Take list of source files instead of single.John MacFarlane1-7/+8
Get latest modification time.
2014-07-27Added compatability layer to support directory-1.1Matthew Pickering1-1/+1
2014-07-27Txt2Tags Reader: Added copyright informationMatthew Pickering1-0/+26
2014-07-27Txt2Tags Reader: Added recognition of macrosMatthew Pickering1-4/+18
2014-07-27Added txt2tags readerMatthew Pickering1-0/+507
http://txt2tags.org/ There are two points which currently do not match the official implementation. 1. In the official implementation lists can not be nested like the following but the reader would interpret this as a bullet list with the first item being a numbered list. ``` - + This is not a list ``` 2. The specification describes how URIs automatically becomes links. Unfortunately as is often the case, their definitiong of URI is not clear. I tried three solutions but was unsure about which to adopt. * Using isURI from Network.URI, this matches far too many strings and is therefore unsuitable * Using uri from Text.Pandoc.Shared, this doesn't match all strings that the reference implementation matches * Try to simulate the regex which is used in the native code I went with the third approach but it is not perfect, for example trailing punctuation is captured in Urls.