mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-08-26 12:16:07 +00:00
Fixed bullet styles and added code highlight on comments
This commit is contained in:
parent
874386ceab
commit
9a3bc27ef4
@ -57,7 +57,7 @@ const modeMap = {
|
|||||||
* Highlight pre elements on a page
|
* Highlight pre elements on a page
|
||||||
*/
|
*/
|
||||||
function highlight() {
|
function highlight() {
|
||||||
let codeBlocks = document.querySelectorAll('.page-content pre');
|
let codeBlocks = document.querySelectorAll('.page-content pre, .comment-box .content pre');
|
||||||
for (let i = 0; i < codeBlocks.length; i++) {
|
for (let i = 0; i < codeBlocks.length; i++) {
|
||||||
highlightElem(codeBlocks[i]);
|
highlightElem(codeBlocks[i]);
|
||||||
}
|
}
|
||||||
@ -75,7 +75,7 @@ function highlightElem(elem) {
|
|||||||
mode = getMode(langName);
|
mode = getMode(langName);
|
||||||
}
|
}
|
||||||
elem.innerHTML = elem.innerHTML.replace(/<br\s*[\/]?>/gi ,'\n');
|
elem.innerHTML = elem.innerHTML.replace(/<br\s*[\/]?>/gi ,'\n');
|
||||||
let content = elem.textContent;
|
let content = elem.textContent.trim();
|
||||||
|
|
||||||
CodeMirror(function(elt) {
|
CodeMirror(function(elt) {
|
||||||
elem.parentNode.replaceChild(elt, elem);
|
elem.parentNode.replaceChild(elt, elem);
|
||||||
|
@ -549,10 +549,10 @@ body.flexbox-support #entity-selector-wrap .popup-body .form-group {
|
|||||||
.content {
|
.content {
|
||||||
padding: $-s;
|
padding: $-s;
|
||||||
font-size: 0.666em;
|
font-size: 0.666em;
|
||||||
}
|
p, ul {
|
||||||
.content p {
|
font-size: $fs-m;
|
||||||
font-size: $fs-m;
|
margin: .5em 0;
|
||||||
margin: .5em 0;
|
}
|
||||||
}
|
}
|
||||||
.reply-row {
|
.reply-row {
|
||||||
padding: $-xs $-s;
|
padding: $-xs $-s;
|
||||||
|
Loading…
Reference in New Issue
Block a user