Commit Graph

2350 Commits (98b1359e06026cb8e9b475b0063fee3a06e5d3f9)

Author SHA1 Message Date
Amitai Schlair b88994ddfa Merge branch 'master' into cvs 2012-02-25 17:15:13 -05:00
Joey Hess 38ff2b44c6 Fix a snail mail address. Closes: #659158 2012-02-08 16:07:20 -04:00
Amitai Schlair 9faa0f3c65 Merge branch 'master' into cvs 2012-02-07 02:47:24 -05:00
Joey Hess 1b6c189578 fix display of page name in recentchanges after a revert
When the wiki is in a subdir of the git repo, a web revert would show
in recentchanges as eg, doc/index, instead of just index.

This happened because decode_git_file caches a $prefix that is dependant
on the $git_dir setting, and the revert code runs with a different
$git_dir, which polluted the $prefix for later.

Fix this by adding a with_git_dir that juggles the variables properly.
2012-02-07 03:06:40 -04:00
Amitai Schlair e45175d545 More testings and fixings:
* Test that adding a text file under a name formerly tracked as
  binary (and vice versa) gets the right keyword-substitution
  behavior.
* Explicitly set -kkv for text files to make the tests pass.
* CVS warns in these cases about "changing keyword expansion mode",
  but this is correct behavior, so filter it from stderr. Filter
  stdout the same way in case we ever want to keep any of it.
* In rcs_add(), replace comments with obviousness.
2012-02-05 16:33:49 -05:00
Amitai Schlair 6753235d98 Write rcs_diff() tests according to the API spec, then make them pass. 2012-02-05 01:20:52 -05:00
Joey Hess c3f9ef8289 revert change to prettydate
Its strftime is from Date::Format, doesn't have the problem, and using the
POSIX one breaks its %o.
2012-02-02 22:27:55 -04:00
Joey Hess a78126c55e calendar, prettydate: Fix strftime encoding bug
strftime is a C function, it does not return decoded utf8.
Several places in ikiwiki manually decoded it, but at least two
forgot to.

Also, strftime might not return even encoded utf8, if LC_TIME is set
to a non-utf8 value. Went ahead and supported decoding whatever encoding
it uses.

The remaining direct calls to strftime() are all ones that first set
LC_TIME=C, in order to get times that are not for human display.
2012-01-30 15:09:37 -04:00
Amitai Schlair d6b7654fcf Move cvs_keyword_subst_args() down with the other internal support routines. 2012-01-26 17:08:12 -05:00
Amitai Schlair ac8eab29e8 Uncomment the CVS keyword substitution mode tests, and make them pass:
Extract cvs_keyword_subst_args() and ensure it runs in $config{srcdir}.
Using Perl's -T operator appears to work equally well, perhaps switch?
2012-01-26 16:57:00 -05:00
Amitai Schlair 9fd09149a3 Mollify strictures about barewords. 2012-01-26 16:55:13 -05:00
Amitai Schlair c9c5264191 Merge branch 'master' of git://git.ikiwiki.info into cvs 2012-01-25 00:41:53 -05:00
Joey Hess bfda13f16c recentchangesdiff: truncate extremely large diffs
A diff was already truncated after 200 lines. But it could still be
arbitrarily enormous, if a spammer or other random noise source likes long
lines. That could use a lot of memory to html encode etc the diff and fill
it into the template. Truncating after 100kb seems sufficient; it allows
for 200 lines of up to 512 characters each.
2012-01-23 18:39:53 -04:00
Joey Hess 100a68f4e2 fix the nodiscount setting 2012-01-23 18:15:14 -04:00
Amitai Schlair 8e99750545 No functional change: sort sub definitions.
In the code:
* general plugin API calls (in plugins/write order),
* VCS plugin API calls (in plugins/write order), then
* internal support routines (in alphabetical order).

In the tests:
* general meta-behavior (in no particular order, yet),
* general plugin API calls (in plugins/write order),
* VCS plugin API calls (in plugins/write order), then
* internal support routines (in semi-logical order).
2012-01-22 10:44:50 -05:00
Joey Hess 18f35269c2 mdwn: Added nodiscount setting, which can be used to avoid using the markdown discount engine, when maximum compatability is needed. 2012-01-16 13:42:30 -04:00
Joey Hess 1572c3c376 attachment: Fix utf-8 display bug. 2012-01-15 16:39:13 -04:00
Joey Hess b38261a03a Workaround discount's eliding of <style> blocks. 2012-01-15 16:19:22 -04:00
Joey Hess 12f86df239 workaround a bug in the discount perl binding
Empty input, or input consisting soley of whitespace
caused an uninitialized value warning.
2012-01-01 17:28:31 -04:00
Joey Hess 9dce803faf discount support
mdwn: Can use the discount markdown library, via the
Text::Markdown::Discount perl module.

This is preferred if available since it's the fastest currently supported
markdown library, speeding up markdown rendering by a factor of 40.

That is to say, when only rendering a lot of markdown, discount is 40x
faster. When building a ikiwiki site, ikiwiki's other overhead gets in the
way, but I still see significant speedups. Building the ikiwiki docwiki
dropped from 62 to 45 seconds, for example.

However, when multimarkdown is enabled, Text::Markdown::Multimarkdown is
still used.

While discount contains some nonstandard markdown extensions,
including tables and footnotes, AFAICS most of them are not
enabled by default in the perl bindings.

I consider sticking to non-extended markdown a desirable thing, since this
is probably not the last markdown engine. In particular, sundown is waiting
in the wings to get packaged and get a perl binding.

----

Reviewing all the showdown extensions, here are the ones that are enabled:

centered paragraphs:

->centered<-

image sizes: [dust mite](http://dust.mite =150x150)

<style>..</style> blocks are eaten. The perl binding does not provide
access to the gathered CSS. This is not legal html anyway, so unlikely
to cause breakage.
2012-01-01 17:28:31 -04:00
Joey Hess b8bf318b91 remove x bit from comments.pm
how did that get set?
2011-12-27 11:37:28 -04:00
Giuseppe Bilotta 7411d1a6ce tag plugin: encode categories using numeric values
This ensures that RSS/Atom feeds produced are valid XML.
2011-12-24 19:43:16 -04:00
Simon McVittie 5333c113d6 Add path and path_natural sort orders
(cherry picked from commit 272e0b2f17)
2011-12-06 14:26:27 -04:00
Joey Hess 6cadcacffd apply Postel's law 2011-11-30 16:25:17 -04:00
Joey Hess 4cb343f348 graphviz: Support wikilinks embedded in the graph.
(Sponsored by The TOVA Company.)
2011-11-30 15:47:13 -04:00
Joey Hess 997116f160 store imagemap in %pagestate, rather than a file
Using a file was sorta not right.

Note that when previewing, %pagestate is not saved, so
it has to rebuild the graph every time until that graph is saved;
then previews can use the cached data until the next time the graph
is changed.

Also note that it's stored in the destpage's pagestate. The imagemap
could vary between a page and an inlined page if wikilinks were supported.
2011-11-30 15:47:12 -04:00
Joey Hess 44863ea234 graphviz: Support urls embedded in the graph, by having graphviz generate an imagemap.
Also, I let preview mode write real files, rather than using data: uri.
Which is ok these days, since ikiwiki tracks files created during
previewing, and cleans them up later.
2011-11-30 15:47:12 -04:00
Joey Hess 41f6363a63 editpage: Fix FormattingHelp link on Discussion pages.
In 875d550f12 I for some reason
made $page be changed when creating a discussion page, which
broke the link on the edit page. Changing page seems unnecessary,
so reverted that part of the change.
2011-11-27 13:19:19 -04:00
Joey Hess 64e09f9968 cannot reproduce 2011-11-23 16:13:16 -04:00
Joey Hess 2872e1d738 cleanup now unused setting 2011-11-17 18:47:51 -04:00
Per Carlson 937c074232 Always use true image size 2011-11-17 22:59:31 +01:00
Joey Hess 875d550f12 Fix handling of discussion page creation links to make discussion pages in the right place and with the right case.
Broken by page case preservation feature added in 3.20110707.
2011-11-06 16:14:04 -04:00
Joey Hess 496874ab27 svn: Support subversion 1.7, which does not have .svn in each subdirectory.
Involved dropping some checks for .svn which didn't add anything, since if
svn is enabled and you point it at a non-svn checkout, you get both pieces.

The tricky part is add and rename, in both cases the new file can be in
some subdirectory that is not added to svn.

For add, turns out svn has a --parents that will deal with this by adding
the intermediate directories to svn as well.

For rename though, --parents fails if the directories exist but are not
yet in svn -- which is exactly the case, since ikiwiki makes them
by calling prep_writefile. So instead, svn add the parent directory,
recursively.

tldr; svn made a reasonable change in dropping the .svn directories from
everywhere, but the semantics of other svn commands, particularly their
pickiness about whether parent directories are in svn or not, means
that without the easy crutch of checking for those .svn directories,
code has to tiptoe around svn to avoid pissing it off.
2011-10-12 19:07:38 -04:00
Joey Hess 5cb0ecc000 Fix web revert of a file deletion.
When reverting, an add is a remove, and a remove is an add.
2011-09-05 14:51:49 -04:00
Joey Hess 35b69392c8 Avoid warning message when generating setup file if highlight is not installed. Closes: #637606
There's a nice message if the plugin is loaded and used and highlight is
not available, and a nice fallback. So no need for this other warning,
which can happen any time all plugins are loaded to generate a setup file.
2011-09-05 13:21:56 -04:00
Joey Hess 7d2b68cd16 inline: When indexing internal pages for searching, use the url of the inlining page. 2011-09-01 11:38:10 -04:00
Joey Hess 4af7b2c14d search: Fix encoding bug in calculation of maximum term size. 2011-08-30 11:37:38 -04:00
Joey Hess 1873095484 Put in a workaround for #622591, by ensuring Search::Xapian gets loaded before Image::Magick. 2011-08-07 11:01:41 -04:00
Joey Hess 5dd414fbe5 mercurial: fix date parsing so test suite passes 2011-07-30 10:52:49 +02:00
Joey Hess 577f5d3837 fix mercurial commit with session but without nickname 2011-07-30 10:46:26 +02:00
Joey Hess ed360d045a Fix escaping of html entities in tag names.
Example case was a tag with & in its name, which resulted in a malformed
rss feed.
2011-07-29 12:54:30 +02:00
Joey Hess 65a7bc4e06 Fix escaping of html entities in permalinks. 2011-07-29 12:37:43 +02:00
Joey Hess 8512ae3ed5 Merge remote-tracking branch 'intrigeri/po' 2011-07-19 14:11:36 -04:00
Joey Hess e04cb1ffd3 mercurial: Implement rcs_diff. (Daniel Andersson) 2011-07-19 11:44:26 -04:00
Joey Hess b4db945b34 mercurial: Make both rcs_getctime and rcs_getmtime fast. (Daniel Andersson) 2011-07-19 11:39:32 -04:00
Joey Hess 86e1dc492f apply the big mercurial patch
* mercurial: openid nicknames are now used when committing. (Daniel Andersson)
* mercurial: implement rcs_commit_staged so comments, attachments, etc
  can be used. (Daniel Andersson)
* mercurial: fix viewing of a diff containing non-utf8 changes.
  (Daniel Andersson)
2011-07-19 11:26:14 -04:00
intrigeri 739554622f Merge commit '3.20110715' into prv/po 2011-07-18 18:41:37 +02:00
intrigeri f5c8fca887 po: add lang_code and lang_name template variables. 2011-07-18 16:39:18 +02:00
Joey Hess 4cd2efef8c fix two recently introduced bugs in rename
* rename: Fix logic error that broke renaming pages when the attachment
  plugin was disabled.
* rename: Fix logic error that bypassed the usual pagespec checks.
2011-07-15 18:46:16 -04:00
Joey Hess 87db6fbb79 only check for held attachments when operating on an attachment 2011-07-15 18:42:00 -04:00