- Source:
Methods
(static) emitEndTag()
Emit the start tag source when not round-trip testing, or when the node is not marked with autoInsertedStart.
Emit the start tag source when not round-trip testing, or when the node is not marked with autoInsertedStart.
- Source:
(static) emitStartTag()
Emit the start tag source when not round-trip testing, or when the node is not marked with autoInsertedStart.
Emit the start tag source when not round-trip testing, or when the node is not marked with autoInsertedStart.
- Source:
(static) getAttrFromDataMw(dataMw, key, keep) → {Array|null
}
(static) getAttributeKVArray(node) → {Array.<KV>}
Get the attributes on a node in an array of KV objects.
Parameters:
Name | Type | Description |
---|---|---|
node |
Node |
- Source:
Returns:
(static) getAttributeShadowInfo(node, name) → {Object|any|boolean|boolean}
Get shadowed information about an attribute on a node.
Parameters:
Name | Type | Description |
---|---|---|
node |
Node | |
name |
string |
- Source:
Returns:
-
- Type
- Object
-
return.value
- Type
- any
-
return.modified If the value of the attribute changed since we parsed the wikitext.
- Type
- boolean
-
return.fromsrc Whether we got the value from source-based roundtripping.
- Type
- boolean
(static) getMediaType(node) → {Object}
Extracts the media type from attribute string
.(static) getShadowInfo() → {Object|any|boolean|boolean}
For new elements, attrs are always considered modified. However, For old elements, we only consider an attribute modified if we have shadow info for it and it doesn't match the current value.
- Source:
Returns:
-
- Type
- Object
-
return.value
- Type
- any
-
return.modified If the value of the attribute changed since we parsed the wikitext.
- Type
- boolean
-
return.fromsrc Whether we got the value from source-based roundtripping.
- Type
- boolean
(static) mkEndTagTk()
EndTagTk
corresponding to a DOM node.
Create a EndTagTk
corresponding to a DOM node.
- Source:
(static) mkTagTk()
TagTk
corresponding to a DOM node.
Create a TagTk
corresponding to a DOM node.
- Source:
(static) nextToDeletedBlockNodeInWT()
In wikitext, did origNode occur next to a block node which has been deleted? While looking for next, we look past DOM nodes that are transparent in rendering.
In wikitext, did origNode occur next to a block node which has been deleted? While looking for next, we look past DOM nodes that are transparent in rendering. (See emitsSolTransparentSingleLineWT for which nodes.)
- Source:
(static) origSrcValidInEditedContext(env, node) → {boolean}
In selser mode, check if an unedited node's wikitext from source wikitext is reusable as is.
In selser mode, check if an unedited node's wikitext from source wikitext is reusable as is.
Parameters:
Name | Type | Description |
---|---|---|
env |
MWParserEnvironment | |
node |
Node |
- Source:
Returns:
- Type
- boolean
(static) precedingSpaceSuppressesIndentPre()
Check if whitespace preceding this node would NOT trigger an indent-pre.
- Source: