Htmlx

org.specs2.html.Htmlx
See theHtmlx companion trait
object Htmlx extends Htmlx

Attributes

Companion
trait
Graph
Supertypes
trait Htmlx
class Object
trait Matchable
class Any
Self type
Htmlx.type

Members list

Type members

Inherited classlikes

case class Header(level: Int, node: Node, namer: UniqueNames)

Attributes

Inherited from:
Htmlx
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object HeaderShow extends Show[Header]

Attributes

Inherited from:
Htmlx
Supertypes
trait Show[Header]
class Object
trait Matchable
class Any
case class NodeRewriteRule(pf: PartialFunction[Node, Seq[Node]]) extends RewriteRule

Attributes

Inherited from:
Htmlx
Supertypes
trait Serializable
trait Product
trait Equals
class RewriteRule
class BasicTransformer
trait Node => Node
class Object
trait Matchable
class Any
Show all

Value members

Inherited methods

def anchorName(name: String): String

create a sanitized anchor name

create a sanitized anchor name

Attributes

Inherited from:
Htmlx
def headers(nodes: NodeSeq): NodeSeq

Attributes

Returns

all the headers and all the subtoc elements of a document

Inherited from:
Htmlx

This rule can be used to add anchors to header elements

This rule can be used to add anchors to header elements

Attributes

Inherited from:
Htmlx
def headersToTree(body: NodeSeq, headers: TreeLoc[Header]): TreeLoc[Header]

collect all the headers as a Tree

collect all the headers as a Tree

Attributes

Inherited from:
Htmlx
def isHeader(e: Node): Boolean

Attributes

Returns

true if the element is a header

Inherited from:
Htmlx
def nodeText(n: Node): String

Attributes

Returns

the text of the first child of a Node

Inherited from:
Htmlx
def rewriteRule(pf: PartialFunction[Node, Seq[Node]]): NodeRewriteRule

Attributes

Returns

a rewrite rule that will rewrite recursively each node based on a partial function

Inherited from:
Htmlx
def sanitize(s: String): String

sanitize a string so that it can be used as a href

sanitize a string so that it can be used as a href

Attributes

Inherited from:
Htmlx
def updateHead(ns: NodeSeq)(f: PartialFunction[Node, Node]): NodeSeq

Attributes

Returns

a NodeSeq where the first Node is updated with a partial function

Inherited from:
Htmlx
def updateHeadAttribute(ns: NodeSeq, name: String, value: Int): NodeSeq

Attributes

Returns

a NodeSeq where the first Node attribute named 'named' has a new value, from an Int

Inherited from:
Htmlx
def updateHeadAttribute(ns: NodeSeq, name: String, value: String): NodeSeq

Attributes

Returns

a NodeSeq where the first Node attribute named 'named' has a new value

Inherited from:
Htmlx
def urls(ns: NodeSeq, filePath: FilePath): List[String]

Attributes

Returns

the href urls in elements

Inherited from:
Htmlx

Givens

Inherited givens

given given_Diffable_NodeSeq: Diffable[NodeSeq]

Attributes

Inherited from:
Htmlx

Extensions

Inherited extensions

extension (n: Node)
def addHeadersAnchors: NodeSeq

Attributes

Inherited from:
Htmlx
extension (ns: NodeSeq)(using nothing: Int)
def addHeadersAnchors: NodeSeq

Attributes

Inherited from:
Htmlx
def headers: NodeSeq

Attributes

Inherited from:
Htmlx
def headersTree: Tree[Header]

Attributes

Inherited from:
Htmlx
extension (ns: Seq[Node])(using nothing: Int)
def updateHead(f: PartialFunction[Node, Node]): NodeSeq

Attributes

Inherited from:
Htmlx
def updateHeadAttribute(name: String, value: String): NodeSeq

Attributes

Inherited from:
Htmlx
extension (s: String)(using nothing: Int)
def anchorName: String

Attributes

Inherited from:
Htmlx
def sanitize: String

Attributes

Inherited from:
Htmlx