An external link, like [http://example.com]
.
More...
|
static | fromSelSerImpl (string $text, Element $node, DataParsoid $dataParsoid, Env $env, array $opts) |
| Base case: the given node type does not correspond to a special ConstrainedText subclass.
|
|
|
static | escapeLine (array $line) |
| This adds necessary escapes to a line of chunks.
|
|
static | cast ( $o, Node $node) |
| Ensure that the argument o , which is perhaps a string, is a instance of ConstrainedText .
|
|
static | fromSelSer (string $text, Element $node, DataParsoid $dataParsoid, Env $env, array $opts=[]) |
| SelSer support: when we come across an unmodified node in during selective serialization, we know we can use the original wikitext for that node unmodified.
|
|
| $text |
|
| $node |
|
| $prefix |
|
| $suffix |
|
| $selser |
|
| $noSep |
|
An external link, like [http://example.com]
.
◆ __construct()
Wikimedia\Parsoid\Html2Wt\ConstrainedText\ExtLinkText::__construct |
( |
string | $text, |
|
|
Element | $node, |
|
|
SiteConfig | $siteConfig, |
|
|
string | $type ) |
- Parameters
-
string | $text | |
Element | $node | |
SiteConfig | $siteConfig | |
string | $type | The type of the link, as described by the rel attribute. |
◆ fromSelSerImpl()
static Wikimedia\Parsoid\Html2Wt\ConstrainedText\ExtLinkText::fromSelSerImpl |
( |
string | $text, |
|
|
Element | $node, |
|
|
DataParsoid | $dataParsoid, |
|
|
Env | $env, |
|
|
array | $opts ) |
|
staticprotected |
Base case: the given node type does not correspond to a special ConstrainedText
subclass.
We still have to be careful: the leftmost (rightmost) children of node
may still be exposed to our left (right) context. If so (ie, their DSR bounds coincide) split the selser text and emit multiple ConstrainedText
chunks to preserve the proper boundary conditions.
- Parameters
-
string | $text | |
Element | $node | |
DataParsoid | $dataParsoid | |
Env | $env | |
array | $opts | |
- Returns
- ConstrainedText|ConstrainedText[]
Reimplemented from Wikimedia\Parsoid\Html2Wt\ConstrainedText\ConstrainedText.
The documentation for this class was generated from the following file:
- src/Html2Wt/ConstrainedText/ExtLinkText.php