function getHeadingText(node) {
			/*
			 * There are two types of headings in markdown:
			 * - ATX headings, which consist of 1-6 # characters followed by content
			 *   and optionally ending with any number of # characters
			 * - Setext headings, which are underlined with = or -
			 * Setext headings are identified by being on two lines instead of one,
			 * with the second line containing only = or - characters. In order to
			 * get the correct heading text, we need to determine which type of
			 * heading we're dealing with.
			 */
			const isSetext =
				node.position.start.line !== node.position.end.line;

			if (isSetext) {
				// get only the text from the first line
				return sourceCode.lines[node.position.start.line - 1].trim();
			}

			// For ATX headings, get the text between the # characters
			const text = sourceCode.getText(node);
			return text
				.slice(node.depth)
				.replace(/\s+#+\s*$/u, "")
				.trim();
		}
Gets the text of a heading node
@param {HeadingNode} node The heading node
@returns {string} The heading text