mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-27 16:30:12 +00:00
VE: Use new object format for importRules
Add in missing mwTable types. Change-Id: I4b2e81f8cd78c61d208a3ef6fdab43d0cc720cb5 Depends-On: I366a091ff4def66cc25200b3d1b2c23ba6b716f7
This commit is contained in:
parent
7e8cf11648
commit
01ef641a66
|
@ -97,25 +97,39 @@ ve.ui.MWReferenceDialog.static.excludeCommands = [
|
|||
* @return {Object} Import rules
|
||||
*/
|
||||
ve.ui.MWReferenceDialog.static.getImportRules = function () {
|
||||
var rules = ve.copy( ve.init.target.constructor.static.importRules );
|
||||
return ve.extendObject(
|
||||
ve.copy( ve.init.target.constructor.static.importRules ),
|
||||
rules,
|
||||
{
|
||||
all: {
|
||||
blacklist: OO.simpleArrayUnion(
|
||||
ve.getProp( ve.init.target.constructor.static.importRules, 'all', 'blacklist' ) || [],
|
||||
[
|
||||
blacklist: ve.extendObject(
|
||||
{
|
||||
// Nested references are impossible
|
||||
'mwReference', 'mwReferencesList',
|
||||
mwReference: true,
|
||||
mwReferencesList: true,
|
||||
// Lists and tables are actually possible in wikitext with a leading
|
||||
// line break but we prevent creating these with the UI
|
||||
'list', 'listItem', 'definitionList', 'definitionListItem',
|
||||
'table', 'tableCaption', 'tableSection', 'tableRow', 'tableCell'
|
||||
]
|
||||
list: true,
|
||||
listItem: true,
|
||||
definitionList: true,
|
||||
definitionListItem: true,
|
||||
table: true,
|
||||
tableCaption: true,
|
||||
tableSection: true,
|
||||
tableRow: true,
|
||||
tableCell: true,
|
||||
mwTable: true,
|
||||
mwTransclusionTableCell: true
|
||||
},
|
||||
ve.getProp( rules, 'all', 'blacklist' )
|
||||
),
|
||||
// Headings are not possible in wikitext without HTML
|
||||
conversions: {
|
||||
mwHeading: 'paragraph'
|
||||
}
|
||||
conversions: ve.extendObject(
|
||||
{
|
||||
mwHeading: 'paragraph'
|
||||
},
|
||||
ve.getProp( rules, 'all', 'conversions' )
|
||||
)
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue