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< ? parsers, bool debug = false, TagflowRenderBoundary? renderBoundary, int? maxDepth, int? maxNodes})TagflowNode> > -
Creates a parser with the default node parsers unless
parsersis 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-depthelement.final - maxNodes → int?
-
Most DOM nodes kept, in document order. Later content is removed and
one
tagflow-limit-nodeselement 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
nodeis content worth keeping. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parse(
String input) → TagflowNode -
Parses
inputinto a node tree. -
parseNode(
Node node) → TagflowNode? -
Parses
nodewith 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