Commit graph

776 commits

Author SHA1 Message Date
fiddlosopher
11e7ad2259 Save and restore position in parseFromString, so that it doesn't
mess up accurate error location reporting.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1049 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-10-13 21:37:06 +00:00
fiddlosopher
403f5f4728 Undid last change: instead of blocking the internal links in the
writers, it makes more sense to block them in the HTML reader.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1048 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-10-12 03:03:29 +00:00
fiddlosopher
4928045915 Man writer: Don't print link source for internal links (#...).
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1047 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-10-11 22:54:01 +00:00
fiddlosopher
ad9603231f Fixed bug in RST reader: previously, code blocks had to be
indented a full tabstop, but RST allows any amount of indentation.
Resolves Issue #27.

+ removed 'variable' parameter from indentedBlock function in
  RST reader, as it is no longer needed
+ updated test suite
+ updated changelog


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1046 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-10-11 05:50:28 +00:00
roktas
175ddc3f6e Makefile:
- New variables to make use in debian/rules: DATADIR, DOCDIR.  Cabal uses
  $prefix/pandoc-$VERSION/doc for the documentation files, where as the
  Debian package uses $prefix/doc/pandoc.  We need these variables to resolve
  the conflict.

debian/rules:

- Set and export DATADIR, DOCDIR which controls the installation of document
  files at install-program target.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1045 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-10-07 21:43:44 +00:00
roktas
ea0d5663be Changes in debian/changelog:
- Use "Closes" phrase to mark the related bug as "done" upon uploading.
- Add signature and comment on changes in Makefile.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1044 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-10-07 17:56:20 +00:00
roktas
068f94a51f Changes in Makefile:
- For generic installations, use $prefix/share/pandoc-$VERSION/doc directory
  to put all the documentation files.  This fixes the issue of having two
  copies of the library documentation (one in $prefix/share/pandoc-doc, the
  other is in $prefix/share/pandoc-$VERSION).
- Remove uninstall-lib-doc target and move the relevant code to uninstall-all
  target.  Add extra code to remove the html directory.  These changes fix the
  issue of leaving the library documentation in $prefix/share/pandoc-$VERSION
  uninstalled.
- Remove the confusing NAME and THIS variables and create new variables: PKG
  (same as THIS), and PKGID ($PKG-$VERSION = $THIS-$VERSION).  Remove RELNAME
  (which is equal to PKGID).  All these changes simplified things a bit in
  "Cabal constants" section and uninstall-all target.
- Remove some Cabal constants for the sake of simplicity and add a few new
  ones: PKGDATAPATH and PKGDOCPATH.  We at least need a PKGDOCPATH variable to
  install DOCS, as Cabal doesn't provide a command for this target (hence,
  install-doc).  I wish to set this variable by using ghc-pkg (just like
  libdir in install-all), but this seems a bit difficult to me, as there is no
  docdir variable in .installed-pkg-config and we would have to resort to an
  unclean hack which extracts docdir from haddock-dir.
- Keep all non-critical steps (i.e. rmdir) quiet to reduce noise.
- Ensure to use stderr for all messages.
- Avoid forking a subshell in $(web_dest).
- A few unrelated cosmetic changes.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1043 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-10-07 17:49:45 +00:00
fiddlosopher
1ea1665955 Updated debian/changelog.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1042 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-10-06 16:23:15 +00:00
fiddlosopher
5e4a0c8b9d New MacPorts Portfile template. Installs pandoc programs and libraries.
Note that 'make install-all' cannot be used to install the libraries,
because registration must be done after the files are copied out of
the destroot.  So a custom install procedure is included in the Portfile.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1041 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-10-06 16:06:37 +00:00
fiddlosopher
3fef30c48c Added libghc6-network-dev, libghc6-xhtml-dev, and libghc6-mtl-dev as
dependencies for libghc6-pandoc-dev.  Addresses Debian Bug #445235.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1040 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-10-04 23:47:33 +00:00
fiddlosopher
a1ad3b4e5f Modified html2markdown. Previously html2markdown piped all input
through html tidy before passing it to pandoc.  This causes problems
on certain sites (e.g. daringfireball.com/markdown) which have
well-formed xhtml that causes tidy to choke.  Solution is to try
pandoc on the original HTML, and run it through tidy only if that
fails.

This means that a temp file is now always used, even when input comes
from a local file or standard input.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1039 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-10-02 02:08:52 +00:00
fiddlosopher
5f64258a4e Add default value for URL in html2x.txt.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1038 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-30 04:16:39 +00:00
fiddlosopher
6e2bc67512 Added link to /pandoc/try on web page.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1037 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-29 20:43:59 +00:00
fiddlosopher
27d3657eef Fixed bug in markdown writer: If an ordered list item began with
a marker greater than 3 characters in width, and the item took more
than one line, it would appear on the line after the list marker,
e.g.:

    (12)
        My list item.
        Multiline.

Now it works as follows:

    (12) My list item.
        Multiline.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1036 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-27 18:52:39 +00:00
fiddlosopher
7a32ad72e3 Documented '--no-wrap' option in README and man pages.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1035 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-27 01:28:28 +00:00
fiddlosopher
5b888e8b3b Added a writer option for wrapped text and a command-line option
'--no-wrap', which disables text wrapping.  (Resolves Issue #26.)

+ Added support for '--no-wrap' to Main.hs.
+ Added wrapIfNeeded function to Text.Pandoc.Shared.
+ Use wrapIfNeeded instead of wrapped in the RST, Man, Docbook, and 
  Markdown writers.
+ Note:  Not yet implemented in HTML, LaTeX, or ConTeXt writers. 
  No documentation yet.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1034 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-27 01:23:44 +00:00
fiddlosopher
fa45b970c9 Changed ref to MacPorts to point to the MacPorts DB entry for pandoc.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1033 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-27 01:20:05 +00:00
fiddlosopher
4f9814087e Fixed a bug in the Markdown writer: incorrect line wrapping in
paragraphs including hard line breaks.  Resolves Issue #25.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1032 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-25 05:43:38 +00:00
fiddlosopher
b0ef5b5b65 Updated html2x.txt to reflect new location of script (in /cgi-bin
instead of /pandoc).


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1031 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-19 03:12:37 +00:00
fiddlosopher
47f847e71f Removed html2x.pl -- it belongs in its own repository.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1030 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-19 03:11:59 +00:00
fiddlosopher
d9dedf0813 RST writer: If label for a link reference contains a colon,
surround by ` signs so the colon won't be interpreted as the
end of the link label.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1029 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-19 01:15:20 +00:00
fiddlosopher
2b429e980e Fixed macports Portfile:
+ Do installation manually rather than using Makefile's install-all.
  (There appears to be a problem with the Makefile's handling of
  DESTDIR.)
+ Note that the library must be registered in the activate phase, after
  the library files have been copied out of the destroot.  Cabal
  generates a 'register.sh' script that will do this.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1028 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-18 15:23:20 +00:00
fiddlosopher
87fb10a316 Main (tabFilter):
Treat '\r' at end of line as newline (in addition to '\r\n' and '\n').


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1027 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-18 06:48:36 +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
fbb048238e Markdown reader: require space before title in links and references.
This fixes a bug in parsing URLs like http://silly/url(withparen).


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1025 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-18 01:34:36 +00:00
fiddlosopher
78ff2d2fee Modified html2x.pl URL validation regex:
+ allow port number in URL
+ allow : in URL path


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1024 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-17 19:55:22 +00:00
fiddlosopher
65047e354a Remove just one leading and one trailing newline
from contents of <pre>...</pre> in codeBlock parser.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1023 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-17 03:08:14 +00:00
fiddlosopher
6f16d52c11 Changed parsing of code blocks in HTML reader:
+ <code> tag is no longer needed.  <pre> suffices.
+ all HTML tags in the code block (e.g. for syntax highlighting)
  are skipped, because they are not portable to other output formats.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1022 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-17 02:49:28 +00:00
fiddlosopher
2094534b3c Modified html2x webpage.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1021 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-16 19:40:17 +00:00
fiddlosopher
e00b892bf6 Added Google analytics tracking to website.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1020 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-16 16:58:04 +00:00
fiddlosopher
9ed11f4500 Fixed URL regex in html2x.pl, and added a command to the pipe
to truncate input pages to 100K.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1019 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-15 21:30:31 +00:00
fiddlosopher
bf100f8276 Added security measures to html2x.pl.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1018 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-15 03:15:27 +00:00
fiddlosopher
b5819b8ed6 Added html2x demo to the website.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1017 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-15 01:53:49 +00:00
fiddlosopher
d5b7257d7f Simplified HTML attribute parsing (HTML reader).
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1016 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-15 00:44:32 +00:00
fiddlosopher
28c2ee396c Fixed two bugs in HTML reader:
+ <code>...</code> not surrounded by <pre> should count as
  inline HTML, not code block.
+ parser for minimized attributes should not swallow trailing spaces


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1015 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-14 22:40:28 +00:00
fiddlosopher
85f655c8cb Changed pandoc home page to http://johnmacfarlane.net/pandoc/.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1014 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-13 17:26:01 +00:00
fiddlosopher
9cadf53621 + Fixed bug in RST writer's handling of ordered lists. Previously,
list items with multiple lines would not always line up with single-line
  list items.  Now, list items are nested the length of the list marker + 1.
  This looks better and ensures that list items all line up.  (Note that
  list markers are padded to the length of the longest list marker in the
  series.)
+ Use 3-space indent for unordered lists.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1013 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-10 23:44:21 +00:00
fiddlosopher
4b4060b8ef Simplified parsing of reference keys and notes in markdown and RST
readers:
+ The Reference data structure from Text.Pandoc.Shared is no longer
  needed, since
+ referenceKey and noteBlock parses return strings (as many blank lines
  as are occuried by the key or note) and update state themselves.
+ getPosition and setPosition are now used to ensure that error messages
  will give the correct line number.
+ This yields cleaner (and slightly faster) code, with more accurate
  parsing error messages.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1012 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-05 23:55:38 +00:00
fiddlosopher
d5e8ab71a4 HTML writer: Don't produce HTML for table of contents if
there are no headers.  (This would be an empty list, which is
invalid XHTML.)


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1011 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-05 02:16:50 +00:00
fiddlosopher
9726ec04f5 Bumped version to 0.45.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1010 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-05 02:16:05 +00:00
fiddlosopher
9ce29d2a67 Updated website with news of 0.43.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1008 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-03 18:27:24 +00:00
fiddlosopher
4088ef9d36 Updated debian/changelog.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1007 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-03 18:17:05 +00:00
fiddlosopher
175a7e27ee No need to add $(BUILDDIR) and $(BUILDCONF) to cleanup_files,
because they are removed automatically by '$(BUILDCMD) clean'.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1006 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-03 18:06:38 +00:00
roktas
1142c88727 * The previous fix was wrong. Apply a proper fix and cross the fingers. :-)
+ On configure, compile 'Setup.hs' to 'setup' and use 'setup' as the build
    command instead of 'runhaskell', which, on some platforms (such as s390,
    alpha, m68k), throws the following error:
    	runhaskell Setup.hs configure --prefix=/usr
	ghc-6.6.1: not built for interactive use
    This causes a serious FTBFS bug.  Closes: #440668 (from Debian BTS).
  + Setup.hs: revert changes.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1005 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-03 16:57:17 +00:00
roktas
b13e696c93 * Urgent fix to address the following issue:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=440668
  The below link of a similar bug explains things a bit more:
	http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=431843#22


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1004 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-03 15:31:47 +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
bab51c6d44 Changed link to Arch PKGBUILD script on website.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1002 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-02 17:52:55 +00:00
fiddlosopher
d87b226f1f Bump version numbers to 0.44, which will be the next
bug-fix release (when enough bug fixes have accumulated).


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1001 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-02 17:23:26 +00:00
fiddlosopher
4f3ad778ba HTML writer: put anchors around contents of headers, not around
the header tags themselves, when producing backlinks to TOC.
Resolves Issue #23.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1000 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-02 17:22:22 +00:00
fiddlosopher
fcdbb7b058 Fixed CSS for website so headers linked back to TOC
don't have lines under them.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@999 788f1e2b-df1e-0410-8736-df70ead52e1b
2007-09-02 17:21:09 +00:00