maria-docs team mailing list archive
Mailing list archive
Re: KB Macro Proposal
On 01/24/2012 11:59 AM, Daniel Bartholomew wrote:
After thinking about this more, I don't think creating new<<input>>
and<<output>> macros is the way to go. Instead we should extend the
existing<<code>> macro to allow the embedding of a new<<highlight>>
Apart from wrapping text inside it in a box,<<highlight>> would have a
"lang=" property, just like<<code>>.
The way it would work in practice would be for example:
MariaDB [test]> <<highlight lang="sql">>SELECT * FROM t1 WHERE d LIKE "%es";<</highlight>>
| d |
| Tuesday |
| Wednesday |
2 rows in set (0.00 sec)
The above code block would then produce output similar to what is shown
at the bottom of the attached screenshot.
If no "lang=" attribute is given, only the box is drawn, and no syntax
colorization or styling of the text happens.
Multiple<<highlight>> blocks should be allowed inside an individual
The reason I'm using<<highlight>> as the name for the macro instead of
<<input>> is that by making it generic, it becomes more obvious that it
can be used for input, output, or anything else that the author of the
article wants to highlight.
As far as the actual name,<<highlight>> is a bit long, maybe we could
use something shorter like<<hl>> (or do both and make one an alias for
What do you think?
Especially for Bryan: How hard would it be to implement the above?
I'm not sure how well creole supports nested macros, but if people like
this approach I can look into it.
Bryan Alsdorf, Lead Web Developer
Monty Program AB. http://montyprogram.com