mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04:00
parent
0d3de40459
commit
58f6219cb3
@ -48,14 +48,16 @@ function highlightElem(elem) {
|
||||
const content = elem.textContent.trimEnd();
|
||||
|
||||
let langName = '';
|
||||
let innerCodeDirection = '';
|
||||
if (innerCodeElem !== null) {
|
||||
langName = innerCodeElem.className.replace('language-', '');
|
||||
innerCodeDirection = innerCodeElem.getAttribute('dir');
|
||||
}
|
||||
|
||||
const wrapper = document.createElement('div');
|
||||
elem.parentNode.insertBefore(wrapper, elem);
|
||||
|
||||
const direction = innerCodeElem.getAttribute('dir') || elem.getAttribute('dir') || '';
|
||||
const direction = innerCodeDirection || elem.getAttribute('dir') || '';
|
||||
if (direction) {
|
||||
wrapper.setAttribute('dir', direction);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user