Fill in the 'name' field in ParsoidModules registration

This avoids the need for extension.json to state the name of the
extension in two different places (which could then disagree).

Parsoid needs the name of the extension which registers a given
module for error reporting.

Bug: T133320
Change-Id: I0abb7ab433e4ac9c94cf2f9720b174372a29dc10
This commit is contained in:
C. Scott Ananian 2020-06-01 16:22:48 -04:00
parent 0997e4eff6
commit 5fb6e52bee

View file

@ -230,6 +230,13 @@ class ExtensionProcessor implements Processor {
$this->extractConfig1( $info );
}
// Record the extension name in the ParsoidModules property
if ( isset( $info['ParsoidModules'] ) ) {
foreach ( $info['ParsoidModules'] as &$module ) {
$module['name'] = $name;
}
}
if ( $version === 2 ) {
$this->extractAttributes( $path, $info );
}