aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs
Commit message (Collapse)AuthorAgeFilesLines
* Match changes in GHC AST for in-tree API AnnotationsAlan Zimmerman2021-03-151-1/+1
| | | | As landed via https://gitlab.haskell.org/ghc/ghc/-/merge_requests/2418
* Add support for labeled module referencesIñaki García Etxebarria2021-02-071-7/+8
| | | | | | | | | | Support a markdown-style way of annotating module references. For instance -- | [label]("Module.Name#anchor") will create a link that points to the same place as the module reference "Module.Name#anchor" but the text displayed on the link will be "label".
* Merge remote-tracking branch 'origin/ghc-8.10' into ghc-9.0Ben Gamari2021-01-051-10/+10
|\
| * Clean up warningsAlec Theriault2020-03-221-1/+1
| | | | | | | | | | | | * unused imports * imports of `Data.List` without import lists * missing `CompatPrelude` file in `.cabal`
| * Replace the 'caption' class so that the collapsible sections are shownKleidukos2020-03-191-1/+1
| |
| * Better identifier parsingAlec Theriault2019-02-251-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * '(<|>)' and '`elem`' now get parsed and rendered properly as links * 'DbModule'/'DbUnitId' now properly get split apart into two links * tuple names now get parsed properly * some more small niceties... The identifier parsing code is more precise and more efficient (although to be fair: it is also longer and in its own module). On the rendering side, we need to pipe through information about backticks/parens/neither all the way through from renaming to the backends. In terms of impact: a total of 35 modules in the entirety of the bootlib + ghc lib docs change. The only "regression" is things like '\0'. These should be changed to @\\0@ (the path by which this previously worked seems accidental).
* | Modules: TypesSylvain Henry2020-03-181-1/+1
|/
* Merge branch 'ghc-8.6' into ghc-headAlec Theriault2018-11-101-2/+2
|\
| * Only run MathJax on entities with "mathjax" class (#960)Alec Theriault2018-11-051-2/+2
| | | | | | | | | | | | | | Correspondingly, we wrap all inline/diplay math in <span class="mathjax"> ... the math .... </span> This fixes #959.
* | Support hyperlink labels with inline markupAlec Theriault2018-11-061-2/+2
|/ | | | The parser for pictures hasn't been properly adjusted yet.
* @since includes package name (#749)Alec Theriault2018-03-271-21/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Metadoc stores a package name This means that '@since' annotations can be package aware. * Get the package name the right way This should extract the package name for `@since` annotations the right way. I had to move `modulePackageInfo` around to do this and, in the process, I took the liberty to update it. Since it appears that finding the package name is something that can fail, I added a warning for this case. * Silence warnings * Hide package for local 'since' annotations As discussed, this is still the usual case (and we should avoid being noisy for it). Although this commit is large, it is basically only about threading a 'Maybe Package' from 'Haddock.render' all the way to 'Haddock.Backends.Xhtml.DocMarkup.renderMeta'. * Bump binary interface version * Add a '--since-qual' option This controls when to qualify since annotations with the package they come from. The default is always, but I've left an 'external' variant where only those annotations coming from outside of the current package are qualified. * Make ParserSpec work * Make Fixtures work * Use package name even if package version is not available The @since stuff needs only the package name passed in, so it makes sense to not be forced to pass in a version too.
* Grid Tables (#718)Oleg Grenrus2018-02-011-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add table examples * Add table types and adopt simple parser Simple parser is done by Giovanni Cappellotto (@potomak) in https://github.com/haskell/haddock/pull/577 It seems to support single fine full tables, so far from full RST-grid tables, but it's good start. Table type support row- and colspans, but obviously parser is lacking. Still TODO: - Latex backend. Should we use multirow package https://ctan.org/pkg/multirow?lang=en? - Hoogle backend: ? * Implement grid-tables * Refactor table parser * Add two ill-examples * Update CHANGES.md * Basic documentation for tables * Fix documentation example
* Use <details> element for collapsibles (#690)Tim Baumann2017-10-091-3/+3
| | | | | | | | | | | * Remove unnecessary call to 'collapseSection' The call is unnecessary since there is no corresponding toggle for hiding the section of orphan instances. * Use <details> for collapsibles This makes them work even when JS is disabled. Closes #560.
* Move `DocMarkup` from haddock-api to haddock-library (#659)Alexander Biehl2017-07-311-0/+1
| | | | | | | | | | * Move `DocMarkup` from haddock-api to haddock-library * Move more markup related functions * Markup module * CHANGELOG
* Fix the documentation for haddock itself.Dominic Steinitz2015-12-211-0/+1
| | | | | | | | | | | | | | | Change notation and add support for inline math. Allow newlines in display math. Add a command line option for the mathjax url (you might want to use a locally installed version). Rebase tests because of extra url and version change. Respond to (some of the) comments. Fix warnings in InterfaceFile.hs
* Handle inline math with mathjax.Dominic Steinitz2015-12-211-0/+2
|
* Fix expansion icon for user-collapsible sectionsMateusz Kowalczyk2015-07-111-2/+3
| | | | Closes #412
* Do not insert anchor for section headings in contents boxwatashi2015-04-261-1/+4
|
* Remove now redundant importsMateusz Kowalczyk2015-03-261-2/+0
|
* Only keep one Version instead of blindly appendingMateusz Kowalczyk2014-12-171-3/+3
|
* Collapse user-defined section by default (re #335)Herbert Valerio Riedel2014-12-121-1/+1
| | | | | Conflicts: haddock-api/src/Haddock/Backends/Xhtml/DocMarkup.hs
* Allow the parser to spit out meta-infoMateusz Kowalczyk2014-12-101-31/+51
| | | | | | | | | | | | | | | Currently we only use it only for ‘since’ annotations but with these patches it should be fairly simple to add new attributes if we wish to. Closes #26. It seems to work fine but due to 7.10 rush I don't have the chance to do more exhaustive testing right now. The way the meta is output (emphasis at the end of the whole comment) is fairly arbitrary and subject to bikeshedding. Note that this makes test for Bug310 fail due to interface version bump: it can't find the docs for base with this interface version so it fails. There is not much we can do to help this because it tests for ’built-in’ identifier, not something we can provide ourselves.
* Experimental support for collapsable headersMateusz Kowalczyk2014-10-291-10/+96
| | | | Closes #335
* Move sources under haddock-api/srcMateusz Kowalczyk2014-08-231-0/+143