return 'header' when it's h1-h6

This commit is contained in:
houxg
2016-12-10 02:26:00 +08:00
parent f39bf4b82b
commit e2a6aed953

View File

@@ -160,6 +160,12 @@
if (listState) {
result.push(listState);
}
var reg = RegExp('^h[1-6]$');
result.reduce(function (previousValue, currentValue, index, array) {
if (reg.test(currentValue)) {
array[index] = 'header';
}
}, null);
console.log(result);
nativeCallbackHandler.onCursorChanged(JSON.stringify(result));
}