Commit graph

4731 commits

Author SHA1 Message Date
Albert Krewinkel
9df589b9c5 Introduce class HasLastStrPosition, generalize functions
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-14 14:57:00 +02:00
John MacFarlane
a8319d1339 LaTeX reader: set bibliography in metadata from \bibliography cmd. 2014-05-11 22:52:29 -07:00
John MacFarlane
0092606476 LaTeX reader: Don't error on "%foo" with no newline. 2014-05-10 23:26:32 -07:00
John MacFarlane
12d0dcffe8 Merge pull request #1290 from tarleb/fix-header-params
Org reader: Fix block parameter reader, relax constraints
2014-05-10 14:57:45 -07:00
Albert Krewinkel
c5fd631b55 Org reader: Fix block parameter reader, relax constraints
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-10 11:35:54 +02:00
John MacFarlane
884693fea8 Merge pull request #1288 from tarleb/update-copyright
Update copyright notices for 2014, add missing notices
2014-05-09 09:53:06 -07:00
John MacFarlane
c092a97132 Merge pull request #1289 from tarleb/code-block-headers
Org reader: Support code block headers, fix reading of block content
2014-05-09 09:51:19 -07:00
Albert Krewinkel
07694b3018 Org reader: Fix parsing of blank lines within blocks
Blank lines were parsed as two newlines instead of just one.
Thanks to Xiao Hanyu (@xiaohanyu) for pointing this out.
2014-05-09 18:23:23 +02:00
Albert Krewinkel
757c4f68f3 Org reader: Support arguments for code blocks
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-09 18:08:30 +02:00
Albert Krewinkel
7760504bb2 Org reader: refactor #+BEGIN..#+END block parsing code 2014-05-09 10:53:08 +02:00
Albert Krewinkel
8fdbef841d Update copyright notices for 2014, add missing notices 2014-05-09 00:46:08 +02:00
John MacFarlane
8afbd7e664 OSX package script: cabal init before update. 2014-05-07 20:12:46 -07:00
John MacFarlane
249c3e8c5a Bumped version bound for mtl. 2014-05-07 11:21:04 -07:00
John MacFarlane
b71810d7e6 Require latest texmath. 2014-05-07 11:10:25 -07:00
John MacFarlane
985ba0b32b Require latest highlighting-kate. 2014-05-07 11:09:45 -07:00
mpickering
f0f88111e6 Small improvement to textile reader fix. Removed 'try'. 2014-05-07 09:48:48 -07:00
mpickering
0050b50905 Fix textile reader hanging.
Textile reader hung on

    pandoc -f textile http://johnmacfarlane.net/pandoc/demo/example25.textile

The reader no longer hangs.
2014-05-07 09:32:25 -07:00
John MacFarlane
0048b8c68c README: Updated Authors. 2014-05-07 09:32:25 -07:00
John MacFarlane
84f2336a7d Textile reader: Rearranged inline parsers for performance.
This is possible because of the rewrite of simpleInline.
Also removed a redundant parser for grouped inlines.
2014-05-06 23:41:56 -07:00
John MacFarlane
442eecc15c Textile reader: Rewrote simpleInline for clarity and efficiency.
This way we only look once for the opening `[`.
2014-05-06 23:27:16 -07:00
John MacFarlane
ea4e947bd0 Textile reader: Disallow blank lines in inline contexts.
@hi

    there@

should not be a single code span.
2014-05-06 23:16:47 -07:00
John MacFarlane
d6a9ba1cdc Make --trace work with textile reader. 2014-05-06 22:28:11 -07:00
John MacFarlane
10644607e3 Textile reader: Rewrote some inline parsing code for clarity.
(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-06 22:14:35 -07:00
John MacFarlane
e7b42947bf Updated tests for template changes. 2014-05-06 20:20:28 -07:00
John MacFarlane
152d5af751 Updated changelog. 2014-05-06 19:45:00 -07:00
John MacFarlane
d508c554f7 LaTeX template: Added linestretch variable.
Documented this and fontfamily.
2014-05-06 10:48:31 -07:00
John MacFarlane
ddb47ef6e8 Added fontfamily variable to latex template. (tlvince) 2014-05-06 09:55:43 -07:00
John MacFarlane
250537532a Updated templates: conditionalize author/date in latex template. 2014-05-06 09:49:13 -07:00
John MacFarlane
1744798d54 Updated changelog. 2014-05-06 09:07:32 -07:00
John MacFarlane
1134950858 Update latex/beamer templates: load upquote after fontenc. 2014-05-06 09:06:25 -07:00
John MacFarlane
5999a36f07 Merge pull request #1280 from tarleb/org-inline-blocks
Org reader: Read inline code blocks
2014-05-06 09:00:10 -07:00
John MacFarlane
ef8de35505 Windows installer: more typos from transition from cabal-dev. 2014-05-06 08:56:52 -07:00
John MacFarlane
7019069a32 Windows install script: Fixed typo in path. 2014-05-06 08:42:30 -07:00
John MacFarlane
5ff2adc08f make_osx_package: install alex, happy, hsb2hs. 2014-05-06 07:25:05 -07:00
John MacFarlane
0e46173ae4 Windows install script: install alex, happy. 2014-05-06 07:22:40 -07:00
Albert Krewinkel
71bd4fb2b3 Org reader: Read inline code blocks
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-06 13:21:26 +02:00
John MacFarlane
7524e8e1f0 Windows package script: use cabal sandbox, not cabal-dev. 2014-05-05 07:08:57 -07:00
John MacFarlane
f31e002726 make_osx_package: Use cpphs to avoid problems with clang cpp.
See https://github.com/jgm/pandoc/issues/1172
2014-05-04 18:48:38 -07:00
John MacFarlane
0edbb5597c Updated changelog. 2014-05-04 16:34:36 -07:00
John MacFarlane
dbd6c1540f Fixed the fix to #1154.
We need to strip off up to 4 spaces, not up to 3.
2014-05-04 16:21:18 -07:00
John MacFarlane
51aa304834 LaTeX writer: Fixed inconsistencies with reference escaping.
- toLabel is now monadic, and it does the needed string escaping.
- Closes #1130.
2014-05-04 14:43:05 -07:00
John MacFarlane
9fe669976c README: Clarified citation key syntax. 2014-05-04 12:21:34 -07:00
John MacFarlane
26dc79cdd1 Clarified use of --natbib and --biblatex.
Not for use with pandoc-citeproc.
2014-05-04 12:18:44 -07:00
John MacFarlane
0c7e084342 Docx writer: Fall back on distribution reference.docx.
* Undid changes to parseXml in last commit.
* Instead of a string fallback, we have parseXml fall back
  on the reference.docx that comes with pandoc if the user's
  reference.docx does not contain a needed file.
* Closes #1185.
2014-05-04 10:54:45 -07:00
John MacFarlane
d728715981 Docx writer: Added ability to give fallback in parseXml. 2014-05-04 10:45:20 -07:00
John MacFarlane
1e50424892 Added test for #1154. 2014-05-04 08:19:48 -07:00
John MacFarlane
3e42f08e87 Markdown reader: Fixed bug with unwanted code in lists.
Closes #1154.

When reading a raw list item, we now strip off nonindent
spaces.
2014-05-04 08:07:17 -07:00
John MacFarlane
6b532c2131 Added Tests.Writer.AsciiDoc to repository. 2014-05-03 22:33:36 -07:00
John MacFarlane
9625cf6f40 README: Note about unnumbered being added to final 'References' sect. 2014-05-03 22:05:24 -07:00
John MacFarlane
96c0c950ca AsciiDoc writer: Handle multiblock table cells.
Closes #1246.
2014-05-03 21:31:53 -07:00