org.ceryle.wiki.filters
Class DashFilter

java.lang.Object
  extended by com.ecyrd.jspwiki.filters.BasicPageFilter
      extended by org.ceryle.wiki.filters.DashFilter
All Implemented Interfaces:
PageFilter

public class DashFilter
extends BasicPageFilter

DashFilter is a simple JSPWiki filter that replaces three dashes with an em-dash ('—') and two dashes with an en-dash ('–'), using character entities. Note that the double and triple dashes must be surrounded on both sides with at least one space character, otherwise it will not be recognized by the filter.

Installation

The jar file containing the filter must be available in your wiki's path, generally in $WIKIHOME/WEB-INF/lib/. Follow the JSPWiki recommendations on inclusion of a $WIKIHOME/WEB-INF/lib/filters.xml file in your wiki installation. 'filters.xml' should contain a <filter> element corresponding to each installed filter. Each <filter> element contains a <class> element containing the respective filter's class, e.g.:

  <?xml version="1.0"?>
  <pagefilters>
     <filter>
       <class>org.ceryle.wiki.filters.DashFilter</class>
     </filter>
  </pagefilters>
 

Author:
Murray Altheim

Field Summary
 
Fields inherited from class com.ecyrd.jspwiki.filters.BasicPageFilter
m_engine
 
Constructor Summary
DashFilter()
           
 
Method Summary
 String postTranslate(WikiContext wikiContext, String content)
           
 String preTranslate(WikiContext wikiContext, String content)
           
 
Methods inherited from class com.ecyrd.jspwiki.filters.BasicPageFilter
destroy, initialize, postSave, preSave
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DashFilter

public DashFilter()
Method Detail

preTranslate

public String preTranslate(WikiContext wikiContext,
                           String content)
Specified by:
preTranslate in interface PageFilter
Overrides:
preTranslate in class BasicPageFilter

postTranslate

public String postTranslate(WikiContext wikiContext,
                            String content)
Specified by:
postTranslate in interface PageFilter
Overrides:
postTranslate in class BasicPageFilter


The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.