• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wikimedia / parsoid / 3259 / 1
85%
master: 85%

Build:
DEFAULT BRANCH: master
Ran 12 Jan 2020 10:24AM UTC
Files 154
Run time 7s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Jan 2020 10:13AM UTC coverage: 84.849%. Remained the same
3259.1

push

travis-ci

jenkins-bot
<a href="https://github.com/wikimedia/parsoid/commit/<a class=hub.com/wikimedia/parsoid/commit/1641a20b0b37312e3e5fcf6e83e024a8ce3019f8">1641a20b0<a href="https://github.com/wikimedia/parsoid/commit/1641a20b0b37312e3e5fcf6e83e024a8ce3019f8">&quot;&gt;Use DOMDataUtils::getNodeData in MachineLanguageGuesser

PHP lacks a general-purpose hash table which can use arbitrary objects
(DOM nodes in this case) as keys.  We&amp;#39;ve tried using expando properties
directly on the PHP objects before, and found that the properties
spontaneously disappear when the original PHP object goes out of scope
and later a new PHP wrapper is created from scratch to wrap the same
underlying C object.  I had been using Node::getNodePath() to give a
string key which can be used in the table, but T241146 shows that this
can break: once LanguageConverter has started to insert new &amp;lt;span&amp;gt; tags
in Text nodes for round-trip information, the NodePath() of subsequent
&amp;lt;span&amp;gt; tags changes, which then causes crashes when the keys corresponding
to these aren&amp;#39;t found.

Use the existing DOMDataUtils::getNodeData() framework to associate
information with Elements instead.  Since this only works on elements,
not Nodes, turn the traversal inside-out a little bit so we manually
compute and sum the results for Text node children of an Element.
In the process, simplify the complicated &amp;quot;shared array&amp;quot; logic of the
original Parsoid/JS version, since PHP gives us shared copy-on-write
arrays &amp;quot;for free&amp;quot;.

Unfortunately, now that we&amp;#39;re using the getNodeData() framework we
need to move language conversion earlier in the DOMPostProcessor
pipeline in order to ensure that the data-object-ids are properly
cleaned up and don&amp;#39;t leak into the output.  Uses the refactored
Parsoid::pb2pb from I</a><a class="double-link" href="https://github.com/wikimedia/parsoid/commit/<a class="double-link" href="https://github.com/wikimedia/parsoid/commit/4a5918d7cdf6e1abb3c806b07464bda8f6ae82b3">4a5918d7c</a>">4a5918d7c</a><a href="https://github.com/wikimedia/parsoid/commit/1641a20b0b37312e3e5fcf6e83e024a8ce3019f8"> to
facilitate loading/storing the data attributes.  Typically, the
`data-parsoid` attribute isn't supplied ... (continued)

9662 of 12132 branches covered (79.64%)

15149 of 17854 relevant lines covered (84.85%)

32874.41 hits per line

Source Files on job 3259.1
  • Tree
  • List 0
  • Changed 26
  • Source Changed 0
  • Coverage Changed 26
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 3026
  • Travis Job 3259.1
  • 1641a20b on github
  • Prev Job for on master (#3258.1)
  • Next Job for on master (#3260.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc