public class SpecialLeadInCharsHandler extends Object implements SpecialLeadInHandler
| Modifier | Constructor and Description |
|---|---|
protected |
SpecialLeadInCharsHandler(com.vladsch.flexmark.util.misc.CharPredicate predicate) |
| Modifier and Type | Method and Description |
|---|---|
static @NotNull SpecialLeadInCharsHandler |
create(char leadInChar) |
static @NotNull SpecialLeadInCharsHandler |
create(@NotNull CharSequence leadInChar) |
boolean |
escape(@NotNull BasedSequence sequence,
@Nullable com.vladsch.flexmark.util.data.DataHolder options,
@NotNull Consumer<CharSequence> consumer)
Escape special lead-in characters which start a block element if first non-whitespace on the line
|
boolean |
unEscape(@NotNull BasedSequence sequence,
@Nullable com.vladsch.flexmark.util.data.DataHolder options,
@NotNull Consumer<CharSequence> consumer)
UnEscape special lead-in characters which start a block element if first non-whitespace on the line
|
protected SpecialLeadInCharsHandler(com.vladsch.flexmark.util.misc.CharPredicate predicate)
public boolean escape(@NotNull
@NotNull BasedSequence sequence,
@Nullable
@Nullable com.vladsch.flexmark.util.data.DataHolder options,
@NotNull
@NotNull Consumer<CharSequence> consumer)
The leadIn sequence is always followed by a space or EOL so if lead in does not require a space to start a block element then test if it starts with the special sequence, otherwise test if it equals the special sequence
escape in interface SpecialLeadInHandlersequence - char sequence appearing as first non-whitespace on a lineoptions - optionsconsumer - consumer of char sequences to be called for the leadIn if it is changed by this handlerpublic boolean unEscape(@NotNull
@NotNull BasedSequence sequence,
@Nullable
@Nullable com.vladsch.flexmark.util.data.DataHolder options,
@NotNull
@NotNull Consumer<CharSequence> consumer)
The leadIn sequence is always followed by a space or EOL so if lead in does not require a space to start a block element then test if it starts with the special sequence, otherwise test if it equals the special sequence
unEscape in interface SpecialLeadInHandlersequence - char sequence appearing as first non-whitespace on a lineoptions - optionsconsumer - consumer of char sequences to be called for the leadIn if it is changed by this handler@NotNull public static @NotNull SpecialLeadInCharsHandler create(char leadInChar)
@NotNull public static @NotNull SpecialLeadInCharsHandler create(@NotNull @NotNull CharSequence leadInChar)
Copyright © 2020. All rights reserved.