You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-08-13 22:12:50 +02:00
All: Fixes #363: Fixed indentation and rendering of lists
This commit is contained in:
@@ -124,17 +124,17 @@
|
||||
loadAndApplyHljs();
|
||||
|
||||
// Remove the bullet from "ul" for checkbox lists and extra padding
|
||||
const checkboxes = document.getElementsByClassName('checkbox');
|
||||
for (let i = 0; i < checkboxes.length; i++) {
|
||||
const cb = checkboxes[i];
|
||||
const ul = cb.parentElement.parentElement;
|
||||
if (!ul) {
|
||||
console.warn('Unexpected layout for checkbox');
|
||||
continue;
|
||||
}
|
||||
ul.style.listStyleType = 'none';
|
||||
ul.style.paddingLeft = 0;
|
||||
}
|
||||
// const checkboxes = document.getElementsByClassName('checkbox');
|
||||
// for (let i = 0; i < checkboxes.length; i++) {
|
||||
// const cb = checkboxes[i];
|
||||
// const ul = cb.parentElement.parentElement;
|
||||
// if (!ul) {
|
||||
// console.warn('Unexpected layout for checkbox');
|
||||
// continue;
|
||||
// }
|
||||
// ul.style.listStyleType = 'none';
|
||||
// ul.style.paddingLeft = 0;
|
||||
// }
|
||||
|
||||
let previousContentHeight = contentElement.scrollHeight;
|
||||
let startTime = Date.now();
|
||||
|
@@ -225,12 +225,7 @@ class MdToHtml {
|
||||
|
||||
if (isCodeBlock) rendererPlugin = this.rendererPlugin_(codeBlockLanguage);
|
||||
|
||||
if (previousToken && previousToken.tag === 'li' && tag === 'p') {
|
||||
// Markdown-it render list items as <li><p>Text<p></li> which makes it
|
||||
// complicated to style and layout the HTML, so we remove this extra
|
||||
// <p> here and below in closeTag.
|
||||
openTag = null;
|
||||
} else if (isInlineCode) {
|
||||
if (isInlineCode) {
|
||||
openTag = null;
|
||||
} else if (tag && t.type.indexOf('html_inline') >= 0) {
|
||||
openTag = null;
|
||||
@@ -495,6 +490,9 @@ class MdToHtml {
|
||||
ul {
|
||||
padding-left: 1.3em;
|
||||
}
|
||||
li p {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.resource-icon {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
|
Reference in New Issue
Block a user