ikiwiki/doc
Joey Hess 7da319efc6 inline: Run format hook first
inline has a format hook that is an optimisation hack. Until this hook
runs, the inlined content is not present on the page. This can prevent
other format hooks, that process that content, from acting on inlined
content. In bug ##509710, we discovered this happened commonly for the
embed plugin, but it could in theory happen for many other plugins (color,
cutpaste, etc) that use format to fill in special html after sanitization.

The ordering was essentially random (hash key order). That's kinda a good
thing, because hooks should be independent of other hooks and able to run
in any order. But for things like inline, that just doesn't work.

To fix the immediate problem, let's make hooks able to be registered as
running "first". There was already the ability to make them run "last".

Now, this simple first/middle/last ordering is obviously not going to work
if a lot of things need to run first, or last, since then we'll be back to
being unable to specify ordering inside those sets. But before worrying about
that too much, and considering dependency ordering, etc, observe how few
plugins use last ordering: Exactly one needs it. And, so far, exactly one
needs first ordering. So for now, KISS.

Another implementation note: I could have sorted the plugins with
first/last/middle as the primary key, and plugin name secondary, to get a
guaranteed stable order. Instead, I chose to preserve hash order. Two
opposing things pulled me toward that decision:

1. Since has order is randomish, it will ensure that no accidental
   ordering assumptions are made.
2. Assume for a minute that ordering matters a lot more than expected.
   Drastically changing the order a particular configuration uses could
   result in a lot of subtle bugs cropping up. (I hope this assumption is
   false, partly due to #1, but can't rule it out.)
2008-12-26 16:09:23 -05:00
..
banned_users
basewiki
bugs merge recentchanges comments fix 2008-12-22 19:04:02 -05:00
cgi
contact
css_market add 2008-08-21 22:23:28 -04:00
examples unify pagespecs 2008-12-21 16:50:50 -05:00
forum update for rename of users/jondowland.mdwn to users/jon.mdwn 2008-12-02 10:00:43 -05:00
ikiwiki improve documentation of postcomment 2008-12-12 15:02:40 -05:00
ikiwiki-mass-rebuild
ikiwikiusers auto-hosting sites 2008-11-18 08:14:57 -05:00
index pull together info on converting to ikiwiki from other systems 2008-10-20 16:55:38 -04:00
install update for rename of users/jondowland.mdwn to users/jon.mdwn 2008-12-02 10:00:42 -05:00
logo
news add news item for ikiwiki 2.71 2008-12-22 00:03:15 -05:00
plugins inline: Run format hook first 2008-12-26 16:09:23 -05:00
post-commit
rcs link to tip 2008-11-26 13:24:36 -05:00
roadmap
sandbox update for rename of users/jondowland.mdwn to users/jon.mdwn 2008-12-02 10:00:29 -05:00
security
setup response 2008-11-28 17:40:41 -08:00
smileys
soc
tags
templates response 2008-09-17 13:45:57 -04:00
tips fix a few directives using the old syntax 2008-12-23 16:25:52 -05:00
todo close 2008-12-23 20:08:01 -05:00
translation
usage
users fix a few directives using the old syntax 2008-12-23 16:25:52 -05:00
w3mmode
wikiicons remove signin icons, use title 2008-12-20 18:46:56 -05:00
GPL
TourBusStop.mdwn essaywriter: nice try, but your spam was recognised and removed 2008-11-20 12:41:26 -05:00
backlinks.mdwn
banned_users.mdwn
basewiki.mdwn move inline docs to ikiwiki/directive/inline 2008-09-11 19:39:35 -04:00
blog.mdwn move inline docs to ikiwiki/directive/inline 2008-09-11 19:39:35 -04:00
bugs.mdwn
cgi.mdwn
commit-internals.mdwn
consultants.mdwn
contact.mdwn
convert.mdwn pull together info on converting to ikiwiki from other systems 2008-10-20 16:55:38 -04:00
css.mdwn
css_market.mdwn Adding two CSS / themes 2008-09-22 10:31:21 -04:00
download.mdwn Arch Linux packaged 2008-12-09 16:58:15 -05:00
examples.mdwn
favicon.ico
features.mdwn update 2008-10-08 18:02:03 -04:00
forum.mdwn turn on archive mode for forum 2008-10-20 15:38:17 -04:00
freesoftware.mdwn
git.mdwn formatting 2008-12-11 13:32:42 -05:00
ikiwiki-makerepo.mdwn monotone updates 2008-08-22 00:22:02 -04:00
ikiwiki-mass-rebuild.mdwn
ikiwiki-transition.mdwn
ikiwiki-update-wikilist.mdwn
ikiwiki.mdwn reorder 2008-09-12 16:12:37 -04:00
ikiwikiusers.mdwn fix popcon graph link 2008-12-23 13:19:47 -05:00
index.mdwn move inline docs to ikiwiki/directive/inline 2008-09-11 19:39:35 -04:00
install.mdwn remove ubuntu instructions, which don't belong here 2008-12-07 13:45:50 -05:00
local.css
logo.mdwn
news.mdwn
pagehistory.mdwn
patch.mdwn
plugins.mdwn
post-commit.mdwn
rcs.mdwn
recentchanges.mdwn
roadmap.mdwn update 2008-12-22 16:41:29 -05:00
robots.txt add a robots.txt 2008-11-10 18:08:09 -05:00
sandbox.mdwn test commit 2008-11-26 13:43:08 -05:00
security.mdwn note fix versions 2008-11-12 17:35:21 -05:00
setup.mdwn typo 2008-09-15 11:32:36 -04:00
shortcuts.mdwn fix entry 2008-10-11 10:29:52 -04:00
sitemap.mdwn
smileys.mdwn
soc.mdwn
style.css comment layout change 2008-12-21 01:04:19 -05:00
tags.mdwn move inline docs to ikiwiki/directive/inline 2008-09-11 19:39:35 -04:00
templates.mdwn fix links 2008-09-14 17:01:05 -04:00
tipjar.mdwn
tips.mdwn
todo.mdwn
translation.mdwn
usage.mdwn move inline docs to ikiwiki/directive/inline 2008-09-11 19:39:35 -04:00
users.mdwn
w3mmode.mdwn
whyikiwiki.mdwn
wikitemplates.mdwn rename comments_form to editcomment 2008-12-19 14:07:22 -05:00
wishlist.mdwn