incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Janne Jalkanen <Janne.Jalka...@ecyrd.com>
Subject Re: Working on CreoleFilter's known issues
Date Wed, 12 Mar 2008 18:26:04 GMT
> The key question is, how can we differentiate? There are two potential
> solutions:
> - Ask JSPWiki if a page with that name exists and if not interpret it
> as an attachment. Is this possible at all?
> - Implement a configurable check so that if the name ends with .png,
> .jpg, etc. it's an image and otherwise it's a page.
>
> I actually like the second more, since it allows showing a link to
> upload the attachment or create the page if it doesn't exist yet.

You will want to do both.  The first one is easy; just check it with  
WikiEngine.pageExists().  The second one is a bit more complicated;  
but you can check JSPWikiMarkupParser.isImageLink() to see how we do  
it currently.  There is already a configuration option for doing  
exactly that kind of a check, and it's not a good idea to introduce  
another configuration for the same purpose.  If CreoleFilter does not  
honour the user settings, it should be dropped out of the distro and  
distributed separately.

/Janne

Mime
View raw message