The type of markup expressions being modified. This corresponds to the values
of ModificationMap, such as Tag for "tags"
or Parameter for "parameters"
.
The current expression object under consideration for modification.
Note: The object's startIndex
and endIndex
values (but not others) are updated in-place
as modifications are applied.
The position of this expression in the array of parsed expressions.
The current array of all expressions of this type, as returned by the corresponding parsing method.
Note: As with value
, the startIndex
and endIndex
values of the objects in the array are dynamically
updated.
Dynamic modification-related information.
The current state of the full wikitext content. This string is updated after every successful modification (i.e., whenever the predicate returns a string). It reflects the content as it exists at the time this predicate is called for this expression. This is useful for context-sensitive changes, such as inspecting neighboring characters or avoiding redundant edits.
A boolean indicating whether this expression is a nested child of a previously modified expression.
This typically occurs when markup structures are nested (e.g., a <b>
inside a <div>
), and the parent
has already been replaced or modified. In such cases, the expression itself may be invalidated or contextually
incorrect in the new content, and the predicate can use this flag to skip or handle it differently.
A string
to replace the current expression, or null
to leave it unchanged. Returning null
ensures that
the original text is preserved.
Type of the callback function used by Wikitext.modify and its shorthand variants. This function is called once for each expression of the specified type and determines whether the expression should be modified.