avinash-k / gwtwiki

Automatically exported from code.google.com/p/gwtwiki
0 stars 0 forks source link

support for tag extensions #94

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Trying to render content from official wiki dumps, I often come across the two 
tags <inputbox> and <imagemap> which are neither supported by the bliki engine, 
nor rendered away.

What is the expected output? What do you see instead?
Is it possible to extend bliki (at some point) to be able to either render 
these, too, or to remove custom tags from the wiki text?
A function to remove HTML tags already exists for include etc. so removing 
these tags, too may be a quick fix (possibly with a custom list of tags that 
should be removed).

What version of the product are you using? On what operating system?
bliki-3.0.18-SNAPSHOT

Please provide any additional information below.
https://www.mediawiki.org/wiki/Extension:InputBox
https://www.mediawiki.org/wiki/Extension:ImageMap

Original issue reported on code.google.com by nico.kru...@googlemail.com on 14 May 2012 at 5:42

GoogleCodeExporter commented 8 years ago
I think we want to be careful here as there are many extensions used in the 
wiki dumps - wikipedia in general. My personal opinion is, the wiki syntax and 
extension system is a total mess. Last time I looked into this there are many 
extensions that mix template functionality with CSS overrides, with custom 
HTML, and just about everything else. Some extensions even generate markup that 
could be directly created by standard media wiki syntax - go figure. 

I use pre-render and post-render cleanup methods to deal with any unsupported 
features/extensions the bliki engine does not handle. I guess, for popular 
extensions it would be nice for bliki engine to have some plugin interface.

Original comment by dfi...@itmatter.com on 14 May 2012 at 6:16

GoogleCodeExporter commented 8 years ago
I added an IgnoreTag which does at least append no output to the HTML buffer.
All tags which should be ignored must be added in the configuration of the 
WikiModel.

static {
  Configuration.DEFAULT_CONFIGURATION.addTokenTag("inputbox", new IgnoreTag("inputbox"));
  Configuration.DEFAULT_CONFIGURATION.addTokenTag("imagemap", new IgnoreTag("imagemap"));
}

See r5177

Original comment by axelclk@gmail.com on 14 May 2012 at 9:12

GoogleCodeExporter commented 8 years ago
I agree @dfi... that we need to be careful with extensions. I wanted to avoid 
pre-render or post-render cleanups as they would go through the string again 
trying to match the tags.

axelclk's solution is perfect. Indeed, I wasn't aware, that supporting HTML 
tags is that simple with bliki - I could probably even implement one of the 
extensions now :)

Original comment by nico.kru...@googlemail.com on 15 May 2012 at 8:14

GoogleCodeExporter commented 8 years ago

Original comment by axelclk@gmail.com on 3 Jun 2012 at 10:53

GoogleCodeExporter commented 8 years ago

Original comment by axelclk@gmail.com on 3 Jul 2012 at 5:42