- 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:
- [[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.
+
+>Disclaimer: 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:
- `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
- `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]]
+ \[[sar search=debian replace="__Debian__"]]
-for enable the sar plugin in this page or
+for define a global replace for the term `--debian--` or
- \[[sar disable = 1]]
+ \[[sar search=ibm first=’[IBM](http://www.ibm.com)’
+ next="_IBM_"]]
-for disable the sar plugin or
+to define a replace for the first match of the string `--ibm--` and a different
+replace for the rest.
- \[[sar search=debian replace="__Debian__"]]
+## Changelog
-to define a global replace for the term `debian` or
+### version 0.8
- \[[sar search=ibm first=’[IBM](http://www.ibm.com)’
- next="_IBM_"]]
+- First functional version with the new sar expressions.
-to define a replace for the first match of the string `ibm` and a different
-replace for the rest, and
+### version 0.7
- \[[sar search=hp ]]
- \[[sar search=hp disable=1]]
+- New design for the search expressions.
-to disable the sar plugin in the current page for the term `hp`.
+### version 0.6
-## Changelog
+- Minor bugfixes in the pages selection.
+- Call to add_depends() for every page filtered
### version 0.5
-This is the first functional version.
+- This is the first functional version.
## Download