WhitespacePreprocessor

laika.parse.text.WhitespacePreprocessor
See theWhitespacePreprocessor companion object
class WhitespacePreprocessor extends String => String

Processes whitespace, removing or replacing most whitespace characters except for newline and space.

It modifies string input in the following ways:

  • Replaces all occurrences of tabs with the corresponding number of spaces, depending on the column the tab is placed in and the configured tabStops value.

  • Removes any return character.

  • Replaces form feed and vertical tab with spaces.

The processor should run on text input before it is passed to the actual parsers as they would not be able to deal with tabs properly.

Attributes

Companion
object
Graph
Supertypes
trait String => String
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def apply(input: String): String

Processes whitespace, removing or replacing most whitespace characters except for newline and space.

Processes whitespace, removing or replacing most whitespace characters except for newline and space.

Attributes

Inherited methods

def andThen[A](g: String => A): T1 => A

Attributes

Inherited from:
Function1
def compose[A](g: A => String): A => R

Attributes

Inherited from:
Function1
override def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Function1 -> Any
Inherited from:
Function1

Concrete fields

val tabStops: Int

The number of columns between tab stops.

The number of columns between tab stops.

Attributes