X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/a85d5229d47296c0826d13280d7aa69bac8d176c..c36b2627e2bf2ecda3783a3e19cec8cbd81bb89d:/doc/plugins/contrib/sar___40__third_party_plugin__41__.mdwn diff --git a/doc/plugins/contrib/sar___40__third_party_plugin__41__.mdwn b/doc/plugins/contrib/sar___40__third_party_plugin__41__.mdwn index 9d3c4adbd..84ab5079b 100644 --- a/doc/plugins/contrib/sar___40__third_party_plugin__41__.mdwn +++ b/doc/plugins/contrib/sar___40__third_party_plugin__41__.mdwn @@ -10,8 +10,6 @@ The characteristics are: - Support for a global dictionary page (optional but recommended). - Is possible to replace the first appearance with a text and the rest with other. -- Support for enable or disable sar engine in any page. -- Support for disable sar engine on any term in any page. The global dictionary page is like this: @@ -31,8 +29,25 @@ The global dictionary page is like this: - [[sar search="smtp" first="\[[wp SMTP]]" next="‘SMTP‘"]] - [[sar search="pop3" first="\[[wp POP3]]" next="’POP3’"]] -The search parameter is a literal text; later will be used as part of the -final regular expression. +The search expressions must be surrounded by double dashes in a source ikiwiki +page, like this: + + Mis programas están escritos en lenguaje --perl--, funcionando con el + sistema --debian--, y mis páginas web funcionan con --ikiwiki-- cuyo autor + es --joey--. + + --ikiwiki-- es un buen software. + +After a filter operation the content is: + + Mis programas están escritos en lenguaje [Perl](http://perl.org), + funcionando con el sistema [Debian](http://debian.org), y mis páginas web + funcionan con [IkiWiki](http://ikiwiki.info) cuyo autor es [Joey + Hess](http://ikiwiki.info/users/joey). + + _IkiWiki_ es un buen software. + +_Note_: I chose this syntax because don't clashes with markdown and it is easy to write. A _search and replace_ directive has the following parameters: @@ -40,8 +55,9 @@ A _search and replace_ directive has the following parameters: - `first`: define the replace text in the first match. - `next`: define the replace text in all matches except the first. - `replace`: define the replace text in all matches. -- `disable`: disable the sar plugin in the current page or the current term if -there is a search parameter. + +Now the code is used at my site without problems, and the author will +appreciate any help with his development or his english. ## Configuration @@ -51,43 +67,29 @@ The plugin need the following global values: - `sar_pagespec`: enable the plugin with a selection of pages. The default value is `*`, but a recommended value is `link(tag/sar)`. -## Caveats - -This plugin works as a filter hook on the source markdown text; the dictionary -terms must be carefully selected, because they could interfere with URLs and -other preprocessor directives. - -The code is highly experimental and the author will appreciate any help with -his development or his english. I'm using at my site with minor problems. - -## sinopsys +## Sinopsys In a ikiwiki source page we can write this - \[[sar]] - -for enable the sar plugin in this page or - - \[[sar disable = 1]] - -for disable the sar plugin or - \[[sar search=debian replace="__Debian__"]] -to define a global replace for the term `debian` or +for define a global replace for the term `--debian--` or \[[sar search=ibm first=’[IBM](http://www.ibm.com)’ next="_IBM_"]] -to define a replace for the first match of the string `ibm` and a different -replace for the rest, and +to define a replace for the first match of the string `--ibm--` and a different +replace for the rest. - \[[sar search=hp ]] - \[[sar search=hp disable=1]] +## Changelog -to disable the sar plugin in the current page for the term `hp`. +### version 0.8 -## Changelog +- First functional version with the new sar expressions. + +### version 0.7 + +- New design for the search expressions. ### version 0.6