Age | Commit message (Collapse) | Author | Files | Lines |
|
an association list, for a slight performance boost.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@532 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
RST reader. The problem was that ``#`` was seen by
'inline' as a potential link or image. Fix: insert
'notFollowedBy (char '`')' in link parsers.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@529 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
"oneOfStrings" in LaTeX reader.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@528 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
especially in "option" contexts.
+ Removed the "try" from the "end" parser in "enclosed"
(Text.Pandoc.Shared). Now "enclosed" behaves like
"option", "manyTill", etc.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@527 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
used a different parser, in RST reader. This fixes
a bug where ````` would not be correctly parsed as
a verbatim `.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@526 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
after the reference key.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@525 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
git-svn-id: https://pandoc.googlecode.com/svn/trunk@521 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
git-svn-id: https://pandoc.googlecode.com/svn/trunk@520 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
It is no longer needed now that all entities are processed in the markdown
and HTML readers. All calls to stringToSGML have been replaced by calls
to encodeEntities.
+ Since inTag's attribute handling already encodes entities,
calls to encodeEntities are no longer needed for attribute values, so
they've been removed.
+ The HTML and Markdown readers now call decodeEntities on all raw
strings (e.g. authors, dates, link titles), to ensure that no unprocessed
entities are included in the native representation of the document.
(In the HTML reader, most of this work is done by a change in
extractAttributeName.)
+ The result is a small speed improvement (around 5% on my benchmark)
and cleaner code.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@519 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
Str inline in Docbook and HTML writers, since now these
strings should not contain literal entity references.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@518 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
Now these are stored as a '"' character, not as '"'.
The function escapeLinkTitle in the Markdown writer is
unnecessary and was removed. Tests modified accordingly.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@517 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
above 128 in HTML and Docbook output, we now just use unicode. After all,
we're declaring UTF-8 content in the header. This makes the HTML and
docbook files produced by pandoc much more readable and editable.
Changes to Entities.hs:
+ Removed specialCharToEntity
+ Added escapeSGMLChar (which just escapes the basic four, <>&")
+ Modified encodeEntities and stringToSGML to use escapeSGMLChar
+ Removed encodeEntitiesNumerical
+ Rewrote encodeEntities for better performance
+ Rewrote stringToSGML for better performance
git-svn-id: https://pandoc.googlecode.com/svn/trunk@516 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
+ Entities are parsed (and unicode characters returned) in both
Markdown and HTML readers.
+ Parsers characterEntity, namedEntity, decimalEntity, hexEntity added
to Entities.hs; these parse a string and return a unicode character.
+ Changed 'entity' parser in HTML reader to use the 'characterEntity'
parser from Entities.hs.
+ Added new 'entity' parser to Markdown reader, and added '&' as a
special character. Adjusted test suite accordingly since now we
get 'Str "AT",Str "&",Str "T"' instead of 'Str "AT&T"..
+ stringToSGML moved to Entities.hs. escapeSGML removed as redundant,
given encodeEntities.
+ stringToSGML, encodeEntities, and specialCharToEntity are given a
boolean parameter that causes only numerical entities to be used.
This is used in the docbook writer. The HTML writer uses named
entities where possible, but not all docbook-consumers know about
the named entities without special instructions, so it seems safer
to use numerical entities there.
+ decodeEntities is rewritten in a way that avoids Text.Regex, using
the new parsers.
+ charToEntity and charToNumericalEntity added to Entities.hs.
+ Moved specialCharToEntity from Shared.hs to Entities.hs.
+ Removed unneeded 'decodeEntities' from 'str' parser in HTML and
Markdown readers.
+ Removed sgmlHexEntity, sgmlDecimalEntity, sgmlNamedEntity, and
sgmlCharacterEntity from Shared.hs.
+ Modified Docbook writer so that it doesn't rely on Text.Regex for
detecting "mailto" links.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@515 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
which does not support unicode:
- escapePreservingRegex removed
- stringToSGML rewritten using Parsec parser
- new parsers for SGML character entities
- escapeSGML rewritten using specialCharToEntity
- new function specialCharToEntity
git-svn-id: https://pandoc.googlecode.com/svn/trunk@514 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
Markdown.pl's behavior. <google.com> is not treated as
a link, but <http://google.com>, <ftp://google.com>, and
<mailto:google@google.com> are.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@513 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
version was not skipping / in close tags.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@512 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
Replaced email regex test with a custom email autolink parser
(autoLinkEmail). Also replaced 'selfClosingTag' with a
custom function 'isSelfClosingTag'.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@511 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
version extracted the attributes, too, which is not wanted.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@510 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
required before an attribute. Previously, <a.b>
would be parsed as an HTML tag with an attribute!
git-svn-id: https://pandoc.googlecode.com/svn/trunk@509 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
So, instead of [site.com](site.com) we get <site.com>.
Changed test suite accordingly.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@508 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
regexs.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@507 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
+ LaTeX writer now handles consecutive quotes properly:
for example, ``\,`hello'\,''
+ LaTeX reader now parses '\,' as empty Str
+ normalizeSpaces function in Shared now removes empty Str elements
+ Modified tests accordingly
git-svn-id: https://pandoc.googlecode.com/svn/trunk@506 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
"don't" as not beginning single quoted contexts.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@505 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
git-svn-id: https://pandoc.googlecode.com/svn/trunk@501 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
list function that can be used to substitute one substring
for another in a string, like 'gsub' except without regular
expressions.
+ Use 'substitute' instead of 'gsub' in the LaTeX writer. This
avoids what appears to be a bug in Text.Regex, whereby "\\^"
matches "\350". There seems to be a slight speed improvement
as well. (Note: If this works, it would be good to replace
other uses of gsub that don't employ regexs with 'substitute'.)
git-svn-id: https://pandoc.googlecode.com/svn/trunk@500 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
possessive when followed by non-alphanumeric.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@499 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
start if followed by 's' and then a non-alphanumeric. (Yes,
this is English-centric, I'm afraid. But it does help, and I
can't think of a language in which 's' by itself is a word.)
git-svn-id: https://pandoc.googlecode.com/svn/trunk@498 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
git-svn-id: https://pandoc.googlecode.com/svn/trunk@497 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
other punctuation must not be an open quote.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@496 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
git-svn-id: https://pandoc.googlecode.com/svn/trunk@495 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
DocBook, and HTML writers. The syntax is documented in
README. Tests have been added to the test suite.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@493 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
git-svn-id: https://pandoc.googlecode.com/svn/trunk@482 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
one gets an error creating the output file in the /tmp directory.
I haven't tracked this one down, but this should serve as a
workaround.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@481 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
an error condition when it gives warnings, so instead we grep
for warnings or error messages to see if we need to print the
log.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@476 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
and made sure error output goes to stderr.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@475 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
numerical entities, for portability across stylesheets.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@473 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
+ Exit if pandoc fails (second time through) -- no need to store the log for this.
+ Run pdflatex up to three times, if needed to resolve references. Also
run bibtex as needed.
+ Minor reformatting.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@469 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
git-svn-id: https://pandoc.googlecode.com/svn/trunk@468 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
be created first!
git-svn-id: https://pandoc.googlecode.com/svn/trunk@465 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
characters Markdown escapes are escaped in strict mode.
When not in strict mode, Pandoc allows all non-alphanumeric
characters to be escaped.
+ Added documentation of backslash escapes to README.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@461 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
git-svn-id: https://pandoc.googlecode.com/svn/trunk@460 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
+ Add a trailing ':' to TEXTINPUTS as per the instruction in TeX FAQ:
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=graphicspath
In the lack of it, pdflatex silently fails, for example, with the
following command: 'TEXINPUTS=/tmp markdown2pdf'
+ Put the origdir at the front for the correct directory search order.
+ pdflatex didn't create log file on one occasion (the above command) that
made sed commands failed. Test the existence of log before filtering it.
+ A few non-essential changes.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@459 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
git-svn-id: https://pandoc.googlecode.com/svn/trunk@458 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
--ignore-args features. This allows a simpler, cleaner design.
Make use of TEXINPUTS environment variable to ensure that
pdflatex will find images and other sources in the working
directory from which markdown2pdf is called.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@456 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
produced, even if it's because a bad option was specified.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@455 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
+ removed -d/--debug option
+ added --dump-args option, which prints the name of the output file
(or '-' for STDOUT) and all the command-line arguments (excluding
Pandoc options and their arguments), one per line, then exits. Note
that special wrapper options will be treated as arguments if they
follow '--' at the end of the command line. Thus,
pandoc --dump-args -o foo.html foo.txt -- -e latin1
will print the following to STDOUT:
foo.html
foo.txt
-e
latin1
+ added --ignore-args option, which causes Pandoc to ignore all
(non-option) arguments, including any special options that occur
after '--' at the end of the command line.
+ '-' now means STDIN as the name of an input file, STDOUT as the
name of an output file. So,
pandoc -o - -
will take input from STDIN and print output to STDOUT. Note that
if multiple '-o' options are specified on the same line, the last
one takes precedence. So, in a script,
pandoc "$@" -o -
will guarantee output to STDOUT, even if the '-o' option was used.
+ documented these changes in man pages, README, and changelog.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@454 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
git-svn-id: https://pandoc.googlecode.com/svn/trunk@452 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
+ Improve sed filter to extract the following error contexts:
1. From a line starting with ! to the next blank line.
2. From a line beginning "LaTeX Warning:" to the next blank line.
3. From a line beginning "Error:" to the next blank line, or EOF.
+ Improve the error message headers (perhaps needs a proof reading).
Prepend the wrapper name to the error headers for easy spotting.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@451 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
/dev/null!
+ Another problem is the sed filter which returns nothing with pdfeTeX
'3.141592-1.21a-2.2 (Web2C 7.5.4)' here. As the first cut towards
fixing, use a somewhat heuristic approach: try to build a short log by
matching against a magic error stamp, dump the whole log if the previous
attempt failed. Note that, there is still room to improve this code.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@450 788f1e2b-df1e-0410-8736-df70ead52e1b
|
|
This produces nicer-looking output by default.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@449 788f1e2b-df1e-0410-8736-df70ead52e1b
|