Add wikitext sequences for lower heading levels

Bug: T146264
Change-Id: I0f9afad27ab11d4eb487c5a18c667eeead3f1c75
This commit is contained in:
Ed Sanders 2016-09-28 11:59:55 -07:00
parent 749dfc9828
commit ba8ca2ab73

View file

@ -14,6 +14,17 @@ ve.ui.sequenceRegistry.register(
ve.ui.sequenceRegistry.register( ve.ui.sequenceRegistry.register(
new ve.ui.Sequence( 'wikitextHeading', 'heading2', [ { type: 'paragraph' }, '=', '=' ], 2 ) new ve.ui.Sequence( 'wikitextHeading', 'heading2', [ { type: 'paragraph' }, '=', '=' ], 2 )
); );
( function () {
var level;
for ( level = 3; level <= 6; level++ ) {
ve.ui.sequenceRegistry.register(
new ve.ui.Sequence(
'wikitextHeadingLevel' + level, 'heading' + level,
[ { type: 'mwHeading', attributes: { level: level - 1 } }, '=' ], 1
)
);
}
} )();
ve.ui.sequenceRegistry.register( ve.ui.sequenceRegistry.register(
new ve.ui.Sequence( 'numberHash', 'numberWrapOnce', [ { type: 'paragraph' }, '#', ' ' ], 2 ) new ve.ui.Sequence( 'numberHash', 'numberWrapOnce', [ { type: 'paragraph' }, '#', ' ' ], 2 )
); );