TagflowParser class

Parses HTML string into TagflowElement

Legacy API: use TagflowHtmlAdapter.parse(...) to produce a runtime TagflowDocument. Removed in tagflow 2.0.

Annotations
  • @Deprecated('Use TagflowHtmlAdapter.parse(...) to build a TagflowDocument instead. ' 'Will be removed in tagflow 2.0.')

Constructors

TagflowParser({List<NodeParser<TagflowNode>>? parsers, bool debug = false, TagflowRenderBoundary? renderBoundary, int? maxDepth, int? maxNodes})
Creates a parser with the default node parsers unless parsers is set.
const

Properties

debug → bool
Logs the parsed DOM when true.
final
hashCode → int
The hash code for this object.
no setterinherited
maxDepth → int?
Deepest element nesting kept, counting the body's children as depth 1. Deeper content is replaced by one tagflow-limit-depth element.
final
maxNodes → int?
Most DOM nodes kept, in document order. Later content is removed and one tagflow-limit-nodes element marks the cut.
final
renderBoundary → TagflowRenderBoundary?
Renders only the content between these comment markers.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

isValidNode(TagflowNode node) → bool
Whether node is content worth keeping.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse(String input) → TagflowNode
Parses input into a node tree.
parseNode(Node node) → TagflowNode?
Parses node with the first parser that handles it.
parseNodes(NodeList nodes) → List<TagflowNode>
Parses the content nodes among nodes.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited