Package com.overzealous.remark
Enum Options.InWordEmphasis
- java.lang.Object
-
- java.lang.Enum<Options.InWordEmphasis>
-
- com.overzealous.remark.Options.InWordEmphasis
-
- All Implemented Interfaces:
Serializable,Comparable<Options.InWordEmphasis>
- Enclosing class:
- Options
public static enum Options.InWordEmphasis extends Enum<Options.InWordEmphasis>
Provides options for how to handle in-word emphasis.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ADD_SPACESAdds spaces around the in-word emphasis characters.NORMALUses the default mode, which allows in-word emphasis.REMOVE_EMPHASISRemoves in-word emphasis altogether.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisAdditionalSpacingNeeded()Returns true when Remark should add spaces around the emphasis characters.booleanisEmphasisPreserved()Returns whether or not to preserve emphasis at all.static Options.InWordEmphasisvalueOf(String name)Returns the enum constant of this type with the specified name.static Options.InWordEmphasis[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NORMAL
public static final Options.InWordEmphasis NORMAL
Uses the default mode, which allows in-word emphasis. Because Remark only uses asterisks for spacing ('*'), this mode works with parsers that disable in-word underscores ('_') but not in-word asterisks.
-
ADD_SPACES
public static final Options.InWordEmphasis ADD_SPACES
Adds spaces around the in-word emphasis characters. This will actually render different output. For example,My<em>Example</em>WordbecomesMy *Example* Word. This will actually render asMy <em>Example</em> Word.
-
REMOVE_EMPHASIS
public static final Options.InWordEmphasis REMOVE_EMPHASIS
Removes in-word emphasis altogether. Designed for parsers that do not allow in-word asterisks or in-word underscores. This means thatMy<em>Example</em>WordbecomesMyExampleWord.
-
-
Method Detail
-
values
public static Options.InWordEmphasis[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Options.InWordEmphasis c : Options.InWordEmphasis.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Options.InWordEmphasis valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
isEmphasisPreserved
public boolean isEmphasisPreserved()
Returns whether or not to preserve emphasis at all.- Returns:
- true if emphasis should be preserved, false to remove it altogether.
-
isAdditionalSpacingNeeded
public boolean isAdditionalSpacingNeeded()
Returns true when Remark should add spaces around the emphasis characters.- Returns:
- true if spaces should be added.
-
-