mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-25 00:38:33 +00:00
044bc50fb6
We avoided fixing these because it causes changes in just about all of the test data, which is annoying when reviewing or blaming changes. But the previous several commits also caused changes in just about all of the test data, so we might as well do this too. Change-Id: I83b64d83b6f12c04dc06c0cadff7cdd89417e137
24 lines
623 B
JavaScript
24 lines
623 B
JavaScript
var ThreadItem = require( './ThreadItem.js' );
|
|
|
|
/**
|
|
* A heading item
|
|
*
|
|
* @class HeadingItem
|
|
* @extends ThreadItem
|
|
* @constructor
|
|
* @param {Object} range
|
|
* @param {number} headingLevel Heading level (1-6)
|
|
* @param {boolean} [placeholderHeading] Item doesn't correspond to a real heading (e.g. 0th section)
|
|
*/
|
|
function HeadingItem( range, headingLevel, placeholderHeading ) {
|
|
// Parent constructor
|
|
HeadingItem.super.call( this, 'heading', 0, range );
|
|
|
|
this.headingLevel = headingLevel;
|
|
this.placeholderHeading = !!placeholderHeading;
|
|
}
|
|
|
|
OO.inheritClass( HeadingItem, ThreadItem );
|
|
|
|
module.exports = HeadingItem;
|