[editor] Improve the headers in the Hive language reference
@@ -92,9 +92,18 @@ const adaptElement = element => {
switch (element.name()) {
case 'a':
- if (element.attr('href') && element.attr('href').value().indexOf('/links') == 0) {
+ if (
+ element.attr('href') &&
+ element
+ .attr('href')
+ .value()
+ .indexOf('/links') == 0
+ ) {
// Internal link
- let ref = element.attr('href').value().replace(/\/links\/_[0-9]+\//, '');
+ let ref = element
+ .attr('href')
+ .value()
+ .replace(/\/links\/_[0-9]+\//, '');
extractorUtils.removeAllAttributes(element);
const anchorMatch = ref.match(/.html#(.+)$/);
@@ -115,6 +124,9 @@ const adaptElement = element => {
element.attr({ class: 'hue-doc-external-link', href: href, target: '_blank' });
}
break;
+ case 'h1':
+ element.text(element.text().replace(/LanguageManual\s(.+)/, '$1'));
+ break;
default:
}
