Commit graph

89 commits

Author SHA1 Message Date
fiddlosopher
0fc174ac78 In HTML tests, use decimal entities for everything above 127.
This is how xhtml-3000.2.0.0 works.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1292 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-06-19 19:05:58 +00:00
fiddlosopher
cd38d4ae79 Markdown smart typography: Em dashes no longer eat surrounding whitespace.
Resolves Issue #69.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1279 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-06-08 03:20:15 +00:00
fiddlosopher
839f77d81e Use style attributes rather than css classes for strikethrough and ordered list styles.
This works better when fragments, rather than standalone documents, are generated.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1245 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-24 18:15:36 +00:00
fiddlosopher
aea6f6802b Removed support for "box-style" block quotes in markdown.
This adds unneeded complexity and makes pandoc diverge further
than necessary from other markdown extensions.
Brought documentation, tests, and debian/changelog up to date.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1141 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-08 19:32:18 +00:00
fiddlosopher
f8a257589b Updated test suite -- no italics for digits.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1133 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-02 08:35:24 +00:00
fiddlosopher
c15dfb2cf9 Updated HTML and S5 writer tests for new span tags in math.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1131 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-02 02:58:07 +00:00
fiddlosopher
d1832da9e1 Added Text.Pandoc.Readers.TeXMath and changed default handling of math.
+ Text.Pandoc.Readers.TeXMath exports readTeXMath, which reads raw TeX
  math and outputs a string of pandoc inlines that tries to render it
  as far as possible, lapsing into literal TeX when needed.
+ Added Text.Pandoc.Readers.TeXMath to pandoc.cabal + ghc66 version.
+ Modified writers so that readTeXMath is used for default HTMl output
  in HTML, S5, RTF, Docbook.
+ Updated README with information about how math is rendered in all formats.
+ Updated test suite.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1129 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-02 00:36:32 +00:00
fiddlosopher
ac133dcba0 Updated tests with new way of displaying math in HTML (with no enclosing $'s).
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1126 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-01 03:11:59 +00:00
fiddlosopher
b008e5d347 Modified writer tests for new Math and TeX output.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1119 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-11-29 08:09:37 +00:00
fiddlosopher
f8eac5b377 Markdown writer: Don't print title attribute if title is empty.
(This differs from the behavior of Markdown.pl, and agrees with PHP
Markdown.  But John Gruber has indicated that he prefers this behavior.)
Adjusted test suite accordingly.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1026 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-18 01:35:50 +00:00
fiddlosopher
2ea3e94957 Added xmlns attribute to html element in html writer tests.
This attribute is added by more recent versions of the
xhtml library, including the one that comes with GHC 6.6.1.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1003 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-03 03:02:01 +00:00
fiddlosopher
f11360f50e Added new rule for enhanced markdown ordered lists: if the list marker
is a capital letter followed by a period (including a single-letter
capital roman numeral), then it must be followed by at least two spaces.
The point of this is to avoid accidentally treating people's initials as
list markers: a paragraph may begin:

    B. Russell was an English philosopher.

and this shouldn't be treated as a list.

Modified Markdown reader and README documentation.
Added a test case.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@880 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-23 04:25:09 +00:00
fiddlosopher
e48f046aa0 + Fixed bug in markdown ordered list parsing. The problem was
that anyOrderedListStart did not check for a space following the
  ordered list marker. So, 'A.B. 2007' would be parsed as a list item,
  then fail because of the lack of space after 'A.' (required by
  orderedListStart). Resolves Issue #22.
+ Fixed a similar problem in RST reader.
+ Added regression test.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@861 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-18 15:26:29 +00:00
fiddlosopher
e814a3f6d2 Major change in the way ordered lists are handled:
+ The changes are documented in README, under Lists.
+ The OrderedList block element now stores information
  about list number style, list number delimiter, and
  starting number.
+ The readers parse this information, when possible.
+ The writers use this information to style ordered
  lists.
+ Test suites have been changed accordingly.

Motivation:  It's often useful to start lists with
numbers other than 1, and to have control over the
style of the list.

Added to Text.Pandoc.Shared:
+ camelCaseToHyphenated
+ toRomanNumeral
+ anyOrderedListMarker
+ orderedListMarker
+ orderedListMarkers

Added to Text.Pandoc.ParserCombinators:
+ charsInBalanced'
+ withHorizDisplacement
+ romanNumeral

RST writer:
+ Force blank line before lists, so that sublists will be handled
  correctly.

LaTeX reader:
+ Fixed bug in parsing of footnotes containing multiple paragraphs,
  introduced by use of charsInBalanced.  Fix: use charsInBalanced'
  instead.

LaTeX header:
+ use mathletters option in ucs package, so that basic unicode Greek
  letters will work properly.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@834 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-08-08 02:43:15 +00:00
fiddlosopher
de72aea6b4 Brought test suite up to date.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@828 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-28 19:15:30 +00:00
fiddlosopher
c9e89e1793 Updated test suite for writers, adding tests for
strikeout, superscript, subscript.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@766 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-22 18:49:23 +00:00
fiddlosopher
a786f43e8c Change to footnotes in HTML writer: Instead of putting the footnote
backlink on a line by itself, after the content of the note,
we now put it at the end of the last paragraph of the footnote.
This saves space and looks better.  More specifically:
+ If the last block of the note is a Para or Plain block, the
  backlink is put at the end of that block's contents.
+ Otherwise, the backlink is put in a separate Plain block by
  itself, after the footnote's contents. 


git-svn-id: https://pandoc.googlecode.com/svn/trunk@697 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-14 03:37:41 +00:00
fiddlosopher
17caba2ffc Added a test case with an inline link containing bracketed text.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@667 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-09 06:59:13 +00:00
fiddlosopher
2d4a22d0be Regularized the scheme for unique header identifiers in HTML writer:
- punctuation is now all removed (except -)
 - spaces are turned into -
 - all lowercase
This scheme should be fairly predictable.
Updated tests accordingly.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@655 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08 17:33:03 +00:00
fiddlosopher
497a1b7815 Changes to tests to accommodate r653.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@654 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08 17:09:37 +00:00
fiddlosopher
766dbb9899 Updated tests to account for changes in HTML writer (identifiers).
git-svn-id: https://pandoc.googlecode.com/svn/trunk@641 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-07-08 03:09:26 +00:00
fiddlosopher
5660e6ba11 Updated test suite with new tests for definition lists.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@597 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-05-10 22:04:36 +00:00
fiddlosopher
402016df28 Fixed bug in noscript part of email obfuscation:
& instead of &


git-svn-id: https://pandoc.googlecode.com/svn/trunk@557 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-03-04 07:40:22 +00:00
fiddlosopher
463a0e5c3e Changes to test suite for new XHTML output.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@550 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-02-27 07:05:11 +00:00
fiddlosopher
141affdb51 More changes in entity handling: Instead of using entities for characters
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
2007-01-27 22:13:11 +00:00
fiddlosopher
f2c2494b66 Modified HTML output for Image elements, to conform to
Markdown.pl:
+ title attribute comes after alt attribute
+ title is included even if null


git-svn-id: https://pandoc.googlecode.com/svn/trunk@445 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-07 01:06:34 +00:00
fiddlosopher
233148f963 Fixed bug in Markdown reader's handling of underscores and other
inline formatting markers inside reference labels:  for example,
in '[A_B]: /url/a_b', the material between underscores was being
parsed as emphasized inlines.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@442 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-06 20:47:00 +00:00
fiddlosopher
bb8478e4e2 Merged changes from 'quotes' branch since r431. Smart typography
is now handled in the Markdown and LaTeX readers, rather than in
the writers.  The HTML writer has been rewritten to use the
prettyprinting library.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@436 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-06 09:54:58 +00:00
fiddlosopher
030d94e1c3 Refactored SGML escaping functions and "in tag" functions to
Text/Shared/Pandoc.  (escapeSGML, stringToSGML, inTag,
inTagSimple, inTagIndented, selfClosingTag)  These can be
used by both the HTML and Docbook writers.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@417 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-01-04 22:52:16 +00:00
fiddlosopher
4ea1b2bdc0 Merged 'strict' branch from r324. This adds a '--strict'
option to pandoc, which forces it to stay as close as possible
to official Markdown syntax.  


git-svn-id: https://pandoc.googlecode.com/svn/trunk@347 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-30 22:51:49 +00:00
fiddlosopher
eea359203a Reversed changes from r246:
+ Removed invisible anchors in front of header tags in HTML output.
  Reason:  no way to prevent duplicate ID attributes (which is invalid
  HTML), since there might be duplicate header titles.  See 
  http://six.pairlist.net/pipermail/markdown-discuss/2005-January/000975.html.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@306 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-29 08:04:39 +00:00
fiddlosopher
d2105f6693 + Added regression tests with footnotes in quote blocks and lists.
+ This uncovered an existing bug in the RTF writer, which got indentation
  wrong on footnotes occuring in indented blocks like lists.  Fixed
  this bug.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@263 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-21 19:33:57 +00:00
fiddlosopher
b98edf2c74 Made javascript obfuscation of emails even more obfuscatory,
by combining it with entity obfuscation.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@254 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-20 18:16:07 +00:00
fiddlosopher
5cf769b1cd Modified the HTML writer to add invisible anchors to each section
heading.  The anchors are derived form the text of the section
heading as described in README.  This makes it easy to insert
links that jump from one part of a document to another:
for example, '[back to the Introduction](#Introduction)'.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@246 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-20 00:25:54 +00:00
fiddlosopher
c1ebe94e40 + Replaced 'comparing' combinator in markdown reader with 'compare'.
'comparing' is from Data.Ord, which is not available in GHC 6.4.
+ Added line break after </li> in HTML footnote output, for easier
  inspection of the source.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@245 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-19 23:46:07 +00:00
fiddlosopher
661c7e7b1d Merged changes to footnotes branch r219-r240.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@241 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-19 23:13:03 +00:00
fiddlosopher
3a6296acae Changed footnote syntax to conform to the de facto standard
for markdown footnotes.  References are now like this[^1]
rather than like this^(1).  There are corresponding changes
in the footnotes themselves.  See the updated README for
more details.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@230 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-19 07:30:36 +00:00
fiddlosopher
fe66a90a2a Changed 'putStrLn' to 'putStr' in Main.hs, and modified some
of the readers to make spacing at end of output more consistent.
Modified tests accordingly.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@201 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-12-16 05:05:02 +00:00
fiddlosopher
df7b682251 initial import
git-svn-id: https://pandoc.googlecode.com/svn/trunk@2 788f1e2b-df1e-0410-8736-df70ead52e1b
2006-10-17 14:22:29 +00:00