Spacing

com.alecdorrington.annotatedtextformat.dom.Spacing
object Spacing

Where spaces go as annotations take text away or put it in.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Spacing.type

Members list

Value members

Concrete methods

def around(text: String, at: Int): (Boolean, Boolean)

Whether a word put in at at in text needs a space before it, and one after it, to stand apart from the words around it: none before after an opening bracket or quote, none after before a closing one or a stop, and none beside a script that does not space its words.

Whether a word put in at at in text needs a space before it, and one after it, to stand apart from the words around it: none before after an opening bracket or quote, none after before a closing one or a stop, and none beside a script that does not space its words.

Attributes

def beside(text: String, span: TextSpan): Option[TextSpan]

The space just after span in text, or else just before it, if either is one, to be taken away with it when it is emptied, so that no two spaces are left together; never a line break, which may be kept as one.

The space just after span in text, or else just before it, if either is one, to be taken away with it when it is emptied, so that no two spaces are left together; never a line break, which may be kept as one.

Attributes

def besides(text: String, span: TextSpan): List[TextSpan]

The spaces that may be taken away with span of text when it is emptied, in the order they are wanted: the one just after it, then the one just before it, of those that are spaces, but never a line break.

The spaces that may be taken away with span of text when it is emptied, in the order they are wanted: the one just after it, then the one just before it, of those that are spaces, but never a line break.

Attributes