Interface SpecialLeadInHandler

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean escape​(@NotNull BasedSequence sequence, @Nullable DataHolder options, @NotNull java.util.function.Consumer<java.lang.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 DataHolder options, @NotNull java.util.function.Consumer<java.lang.CharSequence> consumer)
      UnEscape special lead-in characters which start a block element if first non-whitespace on the line
    • Method Detail

      • escape

        boolean escape​(@NotNull
                       @NotNull BasedSequence sequence,
                       @Nullable
                       @Nullable DataHolder options,
                       @NotNull
                       @NotNull java.util.function.Consumer<java.lang.CharSequence> consumer)
        Escape special lead-in characters which start a block element if first non-whitespace on the line

        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

        Parameters:
        sequence - char sequence appearing as first non-whitespace on a line
        options - additional options if needed
        consumer - consumer of char sequences to be called for the leadIn if it is changed by this handler
        Returns:
        true if sequence was a lead in for the handler
      • unEscape

        boolean unEscape​(@NotNull
                         @NotNull BasedSequence sequence,
                         @Nullable
                         @Nullable DataHolder options,
                         @NotNull
                         @NotNull java.util.function.Consumer<java.lang.CharSequence> consumer)
        UnEscape special lead-in characters which start a block element if first non-whitespace on the line

        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

        Parameters:
        sequence - char sequence appearing as first non-whitespace on a line
        options - additional options if needed
        consumer - consumer of char sequences to be called for the leadIn if it is changed by this handler
        Returns:
        true if sequence was a lead in for the handler