Commit graph

1076 commits

Author SHA1 Message Date
fiddlosopher
b3709022ef Added preliminary support for syntax highlighting to HTML writer.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1213 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-09 03:20:13 +00:00
fiddlosopher
6bd25a10a2 Included highlighting-kate in build-depends.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1212 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-09 03:20:06 +00:00
fiddlosopher
06b544360e Factored codeBlock into separate codeBlockIndented and codeBlockDelimited.
Do not use codeBlockDelimited in strict mode.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1211 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-09 03:20:02 +00:00
fiddlosopher
db0d658e9c Updated test suite to new baseline (but no tests yet for new code block syntax).
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1210 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-09 03:19:54 +00:00
fiddlosopher
614547b38e Use generic attributes type, not a string, for CodeBlocks.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1209 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-09 03:19:43 +00:00
fiddlosopher
705340824d Documentation for delimited code blocks.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1208 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-09 03:19:29 +00:00
fiddlosopher
f2354590f9 Put language class information in pre tag, not code tag, in HTML code blocks.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1207 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-09 03:19:24 +00:00
fiddlosopher
2e683e8b53 Fixed delimited code blocks: eat blank lines afterwards, and allow end line
to contain more tildes than beginning line.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1206 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-09 03:19:17 +00:00
fiddlosopher
24f22ee7ac Added a needed try to {} attribute parser.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1205 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-09 03:19:10 +00:00
fiddlosopher
046c6b0d0d Added support for multiple classes in delimited code block.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1204 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-09 03:19:01 +00:00
fiddlosopher
b06ddad4bc Initial support for delimited code blocks in markdown reader.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1203 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-09 03:18:54 +00:00
fiddlosopher
769e2f3cf5 HTML writer: if language specified for code block, print as <code> class.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1202 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-09 03:18:47 +00:00
fiddlosopher
fa0ab8617a Modified tests for new argument in CodeBlock.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1201 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-09 03:18:38 +00:00
fiddlosopher
2c13782fdf Modified writers for new argument place in CodeBlock.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1200 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-09 03:18:22 +00:00
fiddlosopher
9f7a14c210 Modified readers for new parameter in CodeBlock.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1199 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-09 03:18:03 +00:00
fiddlosopher
6a921f0966 Added parameter for class to CodeBlock (for syntax highlighting).
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1198 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-09 03:17:49 +00:00
roktas
1a80813009 * Debian packaging changes:
+ Migrate to GHC 6.8.2.  Closes: #461606
  + Add new dependencies libghc6-regex-compat-dev and libghc6-uulib-dev.
  + Remove the code in debian/rules which attempts to remove empty ghc6.6
    include directory.  This code may cause an installation failure for the
    -dev package.  Closes: #460658
  + Fix doc-base to prevent a lintian warning.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1197 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-02-09 03:12:03 +00:00
fiddlosopher
76c49ebc63 Added note in INSTALL about doing 'make templates' if installing using Cabal from svn.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1196 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-24 23:05:23 +00:00
fiddlosopher
d3a179cdfc Added \setupitemize[autointro] to ConTeXt header, to prevent orphaned
list introduction lines.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1195 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-23 02:17:59 +00:00
fiddlosopher
6da5be1d0f website: Added math.text to dependencies for examples.html in Makefile.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1194 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-23 02:17:47 +00:00
fiddlosopher
17f516fc15 Moved math.txt -> math.text on web page, so it won't be confused with page source.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1193 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-23 02:17:42 +00:00
fiddlosopher
790fd4612b Changed names of HTML man pages to *.1.html on website.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1192 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-23 02:17:35 +00:00
fiddlosopher
42359e63c9 Fixed bug in RST reader, which would choke on: "p. one\ntwo\n".
Added some try's in ordered list parsers.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1191 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-17 02:14:20 +00:00
fiddlosopher
8f8888df2e Updated INSTALL with instructions for getting GHC + libraries using apt-get.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1190 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-16 18:22:18 +00:00
fiddlosopher
d474852f56 Removed unnecessary imports.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1189 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-16 02:18:23 +00:00
fiddlosopher
155ef838d7 Added Arch linux instructions to INSTALL.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1188 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-14 05:12:16 +00:00
fiddlosopher
6795ffd93f Bumped version to 0.47.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1187 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-08 20:25:46 +00:00
fiddlosopher
c453e2f7d5 Made -c/--css option repeatable on the command line (like -H, -A, -B).
Documented repeatability of these options in README.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1186 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-08 20:21:28 +00:00
fiddlosopher
936465ade0 Updated website with news of version 0.46 release.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1185 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-08 19:57:27 +00:00
fiddlosopher
690677e443 Added some details to RELEASE-CHECKLIST.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1184 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-08 19:42:09 +00:00
fiddlosopher
93079002dc Removed redundant DISTNAME field from freebsd Makefile template.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1183 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-08 19:42:06 +00:00
fiddlosopher
8fca649d05 Changed copyright dates where appropriate to include 2008.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1181 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-08 17:26:16 +00:00
fiddlosopher
a7a519e04c Changed dates on documentation.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1180 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-08 17:25:57 +00:00
fiddlosopher
3c7498455e Removed unneeded link reference from website index.txt.in.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1179 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-08 17:09:14 +00:00
fiddlosopher
2df432dc60 Changed comment used to replace unsafe HTML if sanitize-html option
selected.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1178 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-08 04:53:01 +00:00
roktas
71e508f98a * Debian packaging changes:
+ Remove the empty 'include' directory in -dev package, which lintian
    complains about.
  + Bump Standarts-Version to 3.7.3.
  + Use new 'Homepage:' field to specify the upstream URL on suggestion of
    lintian.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1177 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-08 04:00:35 +00:00
fiddlosopher
65e118ec58 Updated changelog.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1176 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-07 18:44:52 +00:00
fiddlosopher
b9e30ca8b7 RST reader: Fixed bug in parsing explicit links (resolves Issue #44).
The problem was that we were looking for inlines until a '<' character
signaled the start of the URL.  So if you hit a reference-style link,
it would keep looking til the end of the document.  Fix:  change
inline => (notFollowedBy (char '`') >> inline).  Note that this won't
allow code inlines in links, but these aren't allowed in resT anyway.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1175 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-06 19:46:55 +00:00
fiddlosopher
85657add6a RST reader: cleaned up parsing of reference names in key blocks and links.
Allow nonquoted reference links to contain isolated '.', '-', '_', so
so that strings like 'a_b_' count as links.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1174 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-06 19:46:43 +00:00
fiddlosopher
e4837c140c RST reader: Removed unnecessary check for following link in str.
This is unnecessary now that link is above str in the definition of
'inline'.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1173 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-06 19:46:38 +00:00
fiddlosopher
d271473044 Fixed markdown reader to handle "*hi **there***" as a strong nested in an emph.
(A '*' is only recognized as the end of the emphasis if it's not the beginning
of a strong emphasis.)


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1172 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-06 19:46:31 +00:00
fiddlosopher
0e94609e18 Markdown reader: Moved blockQuote parser before list parsers.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1171 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-06 19:46:24 +00:00
fiddlosopher
0b3ffbf339 Added RELEASE-CHECKLIST.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1170 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-06 19:46:18 +00:00
fiddlosopher
0921704d92 Use an interpreted text role to render math in restructuredText.
See http://www.american.edu/econ/itex2mml/mathhack.rst for the
strategy.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1168 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-04 18:59:00 +00:00
fiddlosopher
ec3f6b649f Refactored RST writer to usea record instead of a tuple for state,
and to include options in state so it doesn't need to be passed as
a parameter.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1167 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-04 18:58:50 +00:00
fiddlosopher
5df912b162 Added optional HTML sanitization using a whitelist.
When this option is specified (--sanitize-html on the command line),
unsafe HTML tags will be replaced by HTML comments, and unsafe HTML
attributes will be removed.  This option should be especially useful
for those who want to use pandoc libraries in web applications, where
users will provide the input.

+ Main.hs:  Added --sanitize-html option.
+ Text.Pandoc.Shared:  Added stateSanitizeHTML to ParserState.
+ Text.Pandoc.Readers.HTML:
  - Added whitelists of sanitaryTags and sanitaryAttributes.
  - Added parsers to check these lists (and state) to see if a given
    tag or attribute should be counted unsafe.
  - Modified anyHtmlTag and anyHtmlEndTag to replace unsafe tags
    with comments.
  - Modified htmlAttribute to remove unsafe attributes.
  - Modified htmlScript and htmlStyle to remove these elements if
    unsafe.
  - Modified rawHtmlBlock to use anyHtmlBlockTag instead of anyHtmlTag
    and anyHtmlEndTag.  This fixes a bug in markdown parsing, where
    inline tags would be included in raw HTML blocks.
  - Modified anyHtmlBlockTag to test for (not inline) rather than
    directly for block.  This allows us to handle e.g. docbook in
    the markdown reader.
  - Minor tweaks in nonTitleNonHead  and parseTitle.
+ Text.Pandoc.Readers.Markdown:
  - In non-strict mode use rawHtmlBlocks instead of htmlBlock.
    Simplified htmlBlock, since we know it's only called in strict
    mode.
+ Modified README and man pages to document new option.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1166 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-03 21:32:32 +00:00
fiddlosopher
a505f70f0b Made -H, -A, and -B cumulative: if they are specified multiple times,
multiple files will be included.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1165 788f1e2b-df1e-0410-8736-df70ead52e1b
2008-01-01 20:43:48 +00:00
fiddlosopher
e37df6db69 Fixed bug in the markdown reader: HTML preceding a code block
could cause it to be parsed as a paragraph.  (The problem is that
the HTML parser used to eat all blank space after an HTML block,
including the indentation of the code block.)  Resolves Issue #39.
+ In Text.Pandoc.Readers.HTML, removed parsing of following space
  from rawHtmlBlock.
+ In Text.Pandoc.Readers.Markdown, modified rawHtmlBlocks so that
  indentation is eaten *only* on the first line after the HTML
  block.  This means that in
  <div>
       foo
  <div>
  the foo won't be treated as a code block, but in
  <div>

      foo

  </div>
  it will.  This seems the right approach for least suprise.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1164 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-31 01:02:44 +00:00
fiddlosopher
ad5cbb78d0 HTML reader: Finished fixing Issue #40.
Contents of script tags were still being treated as markdown when
the script tags were parsed as inline.  Fixed by moving "script"
from the list of tags that can be either block or inline to the
list of block tags.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1163 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-31 00:45:54 +00:00
fiddlosopher
d989a78b3b HTML reader: Don't interpret contents of style tags as markdown.
Resolves Issue #40.
+ Added htmlStyle, analagous to htmlScript.
+ Use htmlStyle in htmlBlockElement and rawHtmlInline.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1162 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-12-31 00:05:03 +00:00