mirror of
https://github.com/leanote/leanote-android.git
synced 2025-10-15 06:40:58 +00:00
return 'header' when it's h1-h6
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
Reference in New Issue
Block a user