Age | Commit message (Collapse) | Author | Files | Lines |
|
PR #5884.
+ Use pandoc-types 1.20 and texmath 0.12.
+ Text is now used instead of String, with a few exceptions.
+ In the MediaBag module, some of the types using Strings
were switched to use FilePath instead (not Text).
+ In the Parsing module, new parsers `manyChar`, `many1Char`,
`manyTillChar`, `many1TillChar`, `many1Till`, `manyUntil`,
`mantyUntilChar` have been added: these are like their
unsuffixed counterparts but pack some or all of their output.
+ `glob` in Text.Pandoc.Class still takes String since it seems
to be intended as an interface to Glob, which uses strings.
It seems to be used only once in the package, in the EPUB writer,
so that is not hard to change.
|
|
Text.Pandoc.Shared:
+ Remove `Element` type [API change]
+ Remove `makeHierarchicalize` [API change]
+ Add `makeSections` [API change]
+ Export `deLink` [API change]
Now that we have Divs, we can use them to represent the structure
of sections, and we don't need a special Element type.
`makeSections` reorganizes a block list, adding Divs with
class `section` around sections, and adding numbering
if needed.
This change also fixes some longstanding issues recognizing
section structure when the document contains Divs.
Closes #3057, see also #997.
All writers have been changed to use `makeSections`.
Note that in the process we have reverted the change
c1d058aeb1c6a331a2cc22786ffaab17f7118ccd
made in response to #5168, which I'm not completely
sure was a good idea.
Lua modules have also been adjusted accordingly.
Existing lua filters that use `hierarchicalize` will
need to be rewritten to use `make_sections`.
|
|
Existing FB2 readers, such as FBReader, already display links with type="note" as a superscript.
|
|
|
|
|
|
The haddock module header contains essentially the
same information, so the boilerplate is redundant and
just one more thing to get out of sync.
|
|
Closes #5229.
|
|
Quite a few modules were missing copyright notices.
This commit adds copyright notices everywhere via haddock module
headers. The old license boilerplate comment is redundant with this and has
been removed.
Update copyright years to 2019.
Closes #4592.
|
|
|
|
...rather than in document-info element.
Closes #4854.
|
|
Address #2424
|
|
Address issue #2424
|
|
labdsf-fb2-hrblankline
|
|
|
|
Previously all links were turned into footnotes with unclickable URLs inside.
|
|
HorizontalRule corresponds to <hr> element in the default output
format, HTML. Current HTML standard defines <hr> element as
"paragraph-level thematic break". In typography it is often
represented by extra space or centered asterism ("⁂"), but since
FB2 does not support text centering, empty line (similar to extra space)
is the only solution.
Line breaks, on the other hand, don't generate <empty-line />
anymore. Previously line breaks generated <empty-line /> element
inside paragraph, which is not allowed. So, this commit addresses
issue #2424 ("FB2 produced by pandoc doesn't validate").
FB2 does not have a way to represent line breaks inside paragraphs.
They are replaced with LF character, which is not rendered by
FB2 readers, but at least preserves some information.
|
|
Only <p> and <empty-line /> are allowed in titles,
but <p> has the same type as an ordinary paragraphs.
Therefore, there is no need to remove emphasis from titles.
Also, don't intersperse paragraph with empty lines.
|
|
This seems to be necessary if we are to use our custom Prelude
with ghci.
Closes #4464.
|
|
|
|
|
|
Fixes #4195
|
|
|
|
XML schema requires at least one genre.
|
|
<annotation> is not allowed inside <body> according to FictionBook2 XML schema. Besides that, the same information is already placed inside <description>.
Related bug: #2424
|
|
FB2 writer: make bullet lists consistent with ordered lists
|
|
|
|
Previously bullet lists interacted in odd way with ordered lists.
For example, bullet lists nested in ordered list had incorrect
indentation. Besides that, indentation with spaces is not rendered
by FBReader and fbless. To avoid this problem, bullet lists are
indented by appending bullets to marker just the same way it is
done for ordered lists.
|
|
|
|
According to FB2 XML schema <empty-line /> cannot be placed inside
<p>. Linux FBReader can't display such paragraphs, e.g. any "loose"
lists produced by pandoc prior to this commit. Besides that,
FB2 writer placed <p> inside <p> when writing nested lists,
this commit fixes the bug.
Also this commit removes leading non-breaking space from ordered
lists for consistency with bullet lists.
Definition lists are not affected at all.
|
|
|
|
Previously writer produced one paragraph with <empty-line/> elements,
which are not allowed inside <p> according to FB2 schema.
|
|
|
|
|
|
Removed `writerSourceURL` from `WriterOptions` (API change).
Added `stSourceURL` to `CommonState`.
It is set automatically by `setInputFiles`.
Text.Pandoc.Class now exports `setInputFiles`, `setOutputFile`.
The type of `getInputFiles` has changed; it now returns `[FilePath]`
instead of `Maybe [FilePath]`.
Functions in Class that formerly took the source URL as a parameter
now have one fewer parameter (`fetchItem`, `downloadOrRead`,
`setMediaResource`, `fillMediaBag`).
Removed `WriterOptions` parameter from `makeSelfContained` in
`SelfContained`.
|
|
|
|
Instead, omit them with an INFO message.
Closes #3750.
|
|
This gives 20-30% speedup and reduction of memory
usage in most of the writers.
|
|
* XML.toEntities: changed type to Text -> Text.
* Shared.tabFilter -- fixed so it strips out CRs as before.
* Modified writers to take Text.
* Updated tests, benchmarks, trypandoc.
[API change]
Closes #3731.
|
|
We also export the set of known `schemes`.
The new function replaces the function of the same name
from `Network.URI`, as the latter did not check whether a scheme is
well-known. E.g. MediaWiki wikis frequently feature pages with names
like `User:John`. These links were interpreted as URIs, thus turning
internal links into global links. This is prevented by also checking
whether the scheme of a URI is frequently used (i.e. is IANA registered
or an otherwise well-known scheme).
Fixes: #2713
Update set of well-known URIs from IANA list
All official IANA schemes (as of 2017-05-22) are included in the set of
known schemes. The four non-official schemes doi, isbn, javascript, and
pmid are kept.
|
|
This follows the suggestions given by the FSF for GPL licensed software.
<https://www.gnu.org/prep/maintain/html_node/Copyright-Notices.html>
|
|
Copyright, maintainer etc. were missing in haddock docs for this module.
|
|
|
|
|
|
|
|
|
|
This reverts commit f02a12aff638fa2339192231b8f601bffdfe3e14.
|
|
Made changes where these are used, so that the version
of fetchItem from PandocMonad can be used instead.
|
|
|
|
|
|
Errors can be thrown purely with `throwError`. At the moment there are
only three kinds of errors:
1. PandocFileReadError FilePath (for problems reading a file from the
filesystem)
2. PandocShouldNeverHappenError String (for stuff that should never
happen but we need to pattern-match anyway)
3. PandocSomeError String (a grab bag of everything else)
Of course, we need to subdivide the third item in this list.
|