mediawiki-extensions-Discus.../modules/HeadingItem.js
Bartosz Dziewoński 044bc50fb6 Fix some TODOs about test data
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
2020-10-22 00:21:04 +00:00

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;