aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
AgeCommit message (Collapse)AuthorFilesLines
2014-06-16Naming: Use Docx instead of DocX.John MacFarlane3-44/+44
For consistency with the existing writer.
2014-06-16Merge branch 'docx' of https://github.com/jkr/pandoc into jkr-docxJohn MacFarlane3-0/+1291
2014-06-16Org reader: make tildes create inline code.John MacFarlane1-4/+4
Closes #1345. Also relabeled 'code' and 'verbatim' parsers to accord with the org-mode manual. I'm not sure what the distinction between code and verbatim is supposed to be, but I'm pretty sure both should be represented as Code inlines in pandoc. The previous behavior resulted in the text not appearing in any output format.
2014-06-16Small improvement to fix to #1333.John MacFarlane1-4/+1
This allows blank lines at end of multiline headers.
2014-06-16Markdown reader: fixed #1333 (table parsing bug).John MacFarlane1-5/+6
2014-06-16LaTeX reader: handle leading/trailing spaces in emph better.John MacFarlane1-17/+17
`\emph{ hi }` gets parsed as `[Space, Emph [Str "hi"], Space]` so that we don't get things like `* hi *` in markdown output. Also applies to textbf and some other constructions. Closes #1146. (`--normalize` isn't touched by this, but normalization should not generally be necessary with the changes to the readers.)
2014-06-16LaTeX reader: don't assume preamble doesn't contain environments.John MacFarlane1-1/+1
Closes #1338.
2014-06-16HTML reader: Fixed major parsing problem with HTML tables.John MacFarlane1-15/+11
Table cells were being combined into one cell. Closes #1341.
2014-06-16Merge pull request #1344 from mpickering/masterJohn MacFarlane1-13/+4
Moved extractSpaces to Shared.hs
2014-06-16Org reader: fixed #1342.John MacFarlane1-9/+5
This change rewrites `inlineLaTeXCommand` so that parsec will know when input is being consumed. Previously a run-time error would be produced with some input involving raw latex. (I believe this does not affect the last release, as the inline latex reading was added recently.)
2014-06-16Moved extractSpaces to Shared.hsmpickering1-13/+4
Generalised and move the extractSpaces function from `HTML.hs` to `Shared.hs` so that the docx reader can also use it.
2014-06-16Add DocX files to tree.Jesse Rosenthal3-0/+1291
This introduces Text.Pandoc.DocX, and its exported `readDocX` function.
2014-06-12allow (and discard) optional argument for \captionJames Aspnes1-1/+1
2014-06-03LaTeX reader: Handle comments at the end of tables.John MacFarlane1-0/+1
This resolves the issue illustrated in http://stackoverflow.com/questions/24009489/comments-in-latex-break-pandoc-table.
2014-05-28Merge pull request #1302 from tarleb/inline-latexJohn MacFarlane2-1/+32
Org reader: support for inline LaTeX
2014-05-27Markdown reader: Handle `c++` and `objective-c` as language identifiersJohn MacFarlane1-1/+8
in github-style fenced blocks. Closes #1318. Note: This is special-case handling of these two cases. It would be good to do something more systematic.
2014-05-20Org reader: support for inline LaTeXAlbert Krewinkel2-1/+32
Inline LaTeX is now accepted and parsed by the org-mode reader. Both, math symbols (like \tau) and LaTeX commands (like \cite{Coffee}), can be used without any further escaping.
2014-05-14Merge pull request #1297 from tarleb/citationsJohn MacFarlane2-30/+59
Org reader: support Pandocs citation extension
2014-05-14Org reader: support Pandocs citation extensionAlbert Krewinkel1-2/+53
Citations are defined via the "normal citation" syntax used in markdown, with the sole difference that newlines are not allowed between "[...]". This is for consistency, as org-mode generally disallows newlines between square brackets. The extension is turned on by default and can be turned off via the default syntax-extension mechanism, i.e. by specifying "org-citation" as the input format. Move `citeKey` from Readers.Markdown into Parsing The function can be used by other readers, so it is made accessible for all parsers.
2014-05-14Move `citeKey` from Readers.Markdown to ParsingAlbert Krewinkel1-14/+0
The function can be used by other readers, so it is made accessible for all parsers.
2014-05-14Introduce class HasLastStrPosition, generalize functionsAlbert Krewinkel2-15/+7
Both `ParserState` and `OrgParserState` keep track of the parser position at which the last string ended. This patch introduces a new class `HasLastStrPosition` and makes the above types instances of that class. This enables the generalization of functions updating the state or checking if one is right after a string.
2014-05-12LaTeX reader: Support `\addbibresource`.John MacFarlane1-0/+2
2014-05-11LaTeX reader: set `bibliography` in metadata from `\bibliography` cmd.John MacFarlane1-1/+6
2014-05-10LaTeX reader: Don't error on "%foo" with no newline.John MacFarlane1-1/+1
2014-05-10Org reader: Fix block parameter reader, relax constraintsAlbert Krewinkel1-6/+13
The reader produced wrong results for block containing non-letter chars in their parameter arguments. This patch relaxes constraints in that it allows block header arguments to contain any non-space character (except for ']' for inline blocks). Thanks to Xiao Hanyu for noticing this.
2014-05-09Merge pull request #1288 from tarleb/update-copyrightJohn MacFarlane8-16/+17
Update copyright notices for 2014, add missing notices
2014-05-09Org reader: Fix parsing of blank lines within blocksAlbert Krewinkel1-6/+2
Blank lines were parsed as two newlines instead of just one. Thanks to Xiao Hanyu (@xiaohanyu) for pointing this out.
2014-05-09Org reader: Support arguments for code blocksAlbert Krewinkel1-42/+56
The general form of source block headers (`#+BEGIN_SRC <language> <switches> <header arguments>`) was not recognized by the reader. This patch adds support for the above form, adds header arguments to the block's key-value pairs and marks the block as a rundoc block if header arguments are present. This closes #1286.
2014-05-09Org reader: refactor #+BEGIN..#+END block parsing codeAlbert Krewinkel1-42/+80
2014-05-09Update copyright notices for 2014, add missing noticesAlbert Krewinkel8-16/+17
2014-05-07Small improvement to textile reader fix. Removed 'try'.mpickering1-1/+1
2014-05-07Fix textile reader hanging.mpickering1-1/+2
Textile reader hung on pandoc -f textile http://johnmacfarlane.net/pandoc/demo/example25.textile The reader no longer hangs.
2014-05-06Textile reader: Rearranged inline parsers for performance.John MacFarlane1-4/+3
This is possible because of the rewrite of simpleInline. Also removed a redundant parser for grouped inlines.
2014-05-06Textile reader: Rewrote simpleInline for clarity and efficiency.John MacFarlane1-15/+7
This way we only look once for the opening `[`.
2014-05-06Textile reader: Disallow blank lines in inline contexts.John MacFarlane1-11/+20
@hi there@ should not be a single code span.
2014-05-06Make `--trace` work with textile reader.John MacFarlane1-2/+12
2014-05-06Textile reader: Rewrote some inline parsing code for clarity.John MacFarlane1-12/+8
(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.)
2014-05-06Org reader: Read inline code blocksAlbert Krewinkel1-3/+40
Org's inline code blocks take forms like `src_haskell(print "hi")` and are frequently used to include results from computations called from within the document. The blocks are read as inline code and marked with the special class `rundoc-block`. Proper handling and execution of these blocks is the subject of a separate library, rundoc, which is work in progress. This closes #1278.
2014-05-04Fixed the fix to #1154.John MacFarlane1-1/+1
We need to strip off up to 4 spaces, not up to 3.
2014-05-04Markdown reader: Fixed bug with unwanted code in lists.John MacFarlane1-0/+1
Closes #1154. When reading a raw list item, we now strip off nonindent spaces.
2014-05-03LaTeX reader: Fixed regression introduced with last commit.John MacFarlane1-10/+10
Tests now pass again.
2014-05-03LaTeX reader: Better error messages with include files.John MacFarlane1-55/+117
Closes #1274. Rewrote handleIncludes. We now report the actual source file and position where the error occurs, even if it is included. We do this by inserting special commands, `\PandocStartInclude` and `\PandocEndInclude`, that encode this information in the preprocessing phase. Also generalized the types of a couple functions from `Text.Pandoc.Parsing`.
2014-05-02Fixed empty reference links. Closes #1186.John MacFarlane1-3/+1
Includes test.
2014-05-01Markdown reader: Make one-column pipe tables work.John MacFarlane1-6/+16
Closes #1218.
2014-05-01Merge pull request #1272 from tarleb/link-typesJohn MacFarlane1-8/+60
Org reader: add support for custom link types
2014-05-01Org reader: Add support for custom link typesAlbert Krewinkel1-8/+60
Org allows users to define their own custom link types. E.g., in a document with a lot of links to Wikipedia articles, one can define a custom wikipedia link-type via #+LINK: wp https://en.wikipedia.org/wiki/ This allows to write [[wp:Org_mode][Org-mode]] instead of the equivallent [[https://en.wikipedia.org/wiki/Org_mode][Org-mode]].
2014-04-30RST reader: Some fixes to last change, and use "author" not "authors".John MacFarlane1-6/+7
(in metadata)
2014-04-30RST reader: Better handling of directives.John MacFarlane1-12/+15
* We now correctly handle field lists that are indented more than 3 spaces. * We treat an "aafig" directive as a code block with attributes, so it can be processed in a filter. (Closes #1212.)
2014-04-26LaTeX reader: Made `\nocite` work.John MacFarlane1-3/+6
This adds nocite citations to a metadata field, `nocite`. These will appear in the bibliography but not in the text (unless you use a `$nocite$` variable in your template, of course).
2014-04-25Merge pull request #1265 from tarleb/org-linksJohn MacFarlane2-14/+81
Improvements handling of internal links