Followup to 7b6839ac: Fix crashers during serialization

* Don't unconditionally run fromHTML and before handlers without
  checking if we have a native extension handler.

* Remove unintential implementation of `before` in Ref.php

* Hybrid tests for Cite now passes again.

* Discovered while running native parser tests and isolated those
  crashers to this.

Change-Id: I45b48b595a5aee2b8b8d00b4ebcf73a5ea7bc8a3
This commit is contained in:
Subramanya Sastry 2019-07-12 09:37:24 -05:00 committed by C. Scott Ananian
parent 7b6839ac59
commit 0f0d6e0ed7

View file

@ -164,9 +164,4 @@ class Ref extends ExtensionTag {
);
return $startTagSrc . $src . '</' . $dataMw->name . '>';
}
/** @inheritDoc */
public function before( DOMElement $node, DOMNode $otherNode, SerializerState $state ): ?array {
return null;
}
}