Unregister sequence help for unavailable commands

Bug: T284758
Change-Id: I85fe9332ec723e44b5cb508f9b53a59c9e9b61d9
This commit is contained in:
Ed Sanders 2021-06-17 21:24:31 +01:00
parent 26822864a9
commit 54f2dcf030

View file

@ -63,20 +63,27 @@ sequenceRegistry.register(
sequenceRegistry.register(
new ve.ui.Sequence( 'wikitextTable', 'mwWikitextWarning', '{|' )
);
ve.ui.commandHelpRegistry.unregister( 'table' );
// transclusionFromSequence
sequenceRegistry.register(
new ve.ui.Sequence( 'wikitextTemplate', 'mwWikitextWarning', '{{' )
);
ve.ui.commandHelpRegistry.unregister( 'template' );
// blockquoteWrap
sequenceRegistry.register(
new ve.ui.Sequence( 'wikitextDescription', 'mwWikitextWarning', [ { type: 'paragraph' }, ':' ] )
);
ve.ui.commandHelpRegistry.unregister( 'blockquote' );
// heading1-6
// This sequence doesn't usually have a command as we don't know what
// heading level is required, but for warnings this doesn't matter.
sequenceRegistry.register(
new ve.ui.Sequence( 'wikitextHeading', 'mwWikitextWarning', [ { type: 'paragraph' }, '=', '=' ] )
);
ve.ui.commandHelpRegistry.unregister( 'heading2' );
module.exports = {
commandRegistry: commandRegistry,