org.eclipse.mylyn.wikitext.core.parser.markup
Class DefaultIdGenerationStrategy
java.lang.Object
org.eclipse.mylyn.wikitext.core.parser.markup.IdGenerationStrategy
org.eclipse.mylyn.wikitext.core.parser.markup.DefaultIdGenerationStrategy
public class DefaultIdGenerationStrategy
- extends IdGenerationStrategy
A default ID generation strategy which removes all non-alphanumeric characters from the heading text to produce an
id.
- Since:
- 1.0
- Author:
- David Green
Method Summary |
String |
generateId(String headingText)
produce an id for use in an HTML anchor from heading text. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultIdGenerationStrategy
public DefaultIdGenerationStrategy()
generateId
public String generateId(String headingText)
- Description copied from class:
IdGenerationStrategy
- produce an id for use in an HTML anchor from heading text.
- Specified by:
generateId
in class IdGenerationStrategy
- Parameters:
headingText
- the text of the heading
- Returns:
- an Id, or null if no Id could be computed from the given text
Copyright © 2007, 2009 David Green and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html