extensions/markdown-language-features/src/languageFeatures/folding.ts/isFoldableToken
const isFoldableToken = (token: Token): token is MarkdownItTokenWithMap => {
	if (!token.map) {
		return false;
	}

	switch (token.type) {
		case 'fence':
		case 'list_item_open':
			return token.map[1] > token.map[0];

		case 'html_block':
			if (isRegionMarker(token)) {
				return false;
			}
			return token.map[1] > token.map[0] + 1;

		default:
			return false;
	}
};