aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Parser.hs
Commit message (Collapse)AuthorAgeFilesLines
* Move sources under haddock-api/srcMateusz Kowalczyk2014-08-231-44/+0
|
* Remove no longer necessary parser error handling.Mateusz Kowalczyk2014-05-061-10/+7
| | | | | We can now drop some Maybe tests and even lets us strip an error handling monad away in a few places.
* Move parser + parser tests out to own package.Mateusz Kowalczyk2014-05-051-499/+30
| | | | | | | | | | We move some types out that are necessary as well and then re-export and specialise them in the core Haddock. Reason for moving out spec tests is that if we're working on the parser, we can simply work on that and we can ignore the rest of Haddock. The downside is that it's a little inconvenient if at the end of the day we want to see that everything passes.
* Prepare modules for parser split.Mateusz Kowalczyk2014-05-051-113/+147
| | | | | We have to generalise the Doc (now DocH) slightly to remove the dependency on GHC-supplied type.
* Parse identifiers with ^ and ⋆ in them.Mateusz Kowalczyk2014-04-111-1/+9
| | | | Fixes #298.
* Drop leading whitespace in @-style blocks.Mateusz Kowalczyk2014-03-311-3/+28
| | | | Fixes #201.
* Don't shadow ‘strip’.Mateusz Kowalczyk2014-02-231-4/+4
| | | | -Wall complains
* Turn a source code comment into specsSimon Hengel2014-02-221-2/+0
|
* Strip a single leading space from bird tracks (#201)Niklas Haas2014-02-221-1/+10
| | | | | | | | | | | | | | | | | | | | This makes bird tracks in the form > foo > bar > bat parse as if they had been written as >foo >bar >bat ie. without the leading whitespace in front of every line. Ideally we also want to look into how leading whitespace affects code blocks written using the @ @ syntax, which are currently unaffected by this patch.
* Fix @ code blocksMateusz Kowalczyk2014-01-301-0/+1
| | | | | | In cases where we had some horizontal space before the closing ‘@’, the parser would not accept the block as a code block and we'd get ugly output.
* Allow escaping in URLs and pictures.Mateusz Kowalczyk2014-01-121-4/+15
| | | | | | | | | Some tests were moved under parseString as they weren't about paragraph level markup. Conflicts: src/Haddock/Parser.hs test/Haddock/ParserSpec.hs
* Allow for nesting of paragraphs under lists.Mateusz Kowalczyk2014-01-121-26/+84
| | | | | | | | | | | | | | | | | The nesting rules are similar to Markdown's with the exception that we can not simply indent the first line of a hard wrapped indented paragraph and have it treated as if it was fully indented. The reason is differences in markup as some of our constructs care about whitespace while others just swallow everything up so it's just a lot easier to not bother with it rather than making arbitrary rules. Note that we now drop trailing for string entities inside of lists. They weren't needed and it makes the output look uniform whether we use a single or double newline between list elements. Conflicts: src/Haddock/Parser.hs test/Haddock/ParserSpec.hs
* Allow for headings inside function documentation.Mateusz Kowalczyk2014-01-121-2/+12
| | | | | | | | | | | | | LaTeX will treat the h3-h6 headings the same as we'd have to hack the style file heavily otherwise and it would make the headings tiny anyway. Hoogle upstream said they will put in the functionality on their end. Conflicts: src/Haddock/Interface/Rename.hs src/Haddock/Types.hs test/Haddock/ParserSpec.hs
* Support for bold.Mateusz Kowalczyk2014-01-121-2/+13
| | | | | | | Conflicts: src/Haddock/Backends/Hoogle.hs src/Haddock/Interface/Rename.hs src/Haddock/Parser.hs
* Fix totality, unicode, examples, paragraph parsingSimon Hengel2014-01-121-280/+202
| | | | | | | | Also simplify specs and parsers while we're at it. Some parsers were made more generic. This commit is a part of GHC pre-merge squash, email fuuzetsu@fuuzetsu.co.uk if you need the full commit history.
* Don't append newline to parseString inputSimon Hengel2014-01-121-18/+12
| | | | We also check that we have parsed everything with endOfInput.
* One pass parser and tests.Mateusz Kowalczyk2014-01-121-0/+435
We remove the HTML test as it is no longer necessary. We cover the test case in spec tests and other HTML tests but keeping this around fails: this is because the new parser has different semantics there. In fact, I suspect the original behaviour was a bug that wasn't caught/fixed but simply included as-is during the testing.