-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix li
elements
#5
Conversation
Should they be? I guess I get it. But weird that I didn't add it before. Could you check the source of the blockOrCaption list, what's with li's there? |
The
I think so. Running |
Hmm. Not sure. The URL above the list definitely shows that let node = document.createElement('ol');
let li1 = document.createElement('li');
let li2 = document.createElement('li');
li1.textContent = 'alpha';
li2.textContent = 'bravo';
node.appendChild(li1);
node.appendChild(li2);
console.log(node.innerText) // 'alphabravo' edit: oh, if I append it to the DOM in between, it does add a |
OK, I confirmed that let node = document.createElement('ol');
let li1 = document.createElement('l-i');
let li2 = document.createElement('l-i');
li1.style.display = 'list-item' // w/o this line, it’s `alphabravo`; w/o this line, w/ `li1` as `li`, it’s also `alpha\nbravo`
li1.textContent = 'alpha';
li2.textContent = 'bravo';
node.appendChild(li1);
node.appendChild(li2);
document.body.appendChild(node);
console.log(node.innerText) |
Signed-off-by: Titus <tituswormer@gmail.com>
This comment has been minimized.
This comment has been minimized.
Thanks Goran! Released! |
Initial checklist
Description of changes
Currently,
li
elements are not interpreted as blocks, soul
andol
elements get parsed into a single line of text.Running the above yields
'FoxtrotGolf'
instead of'Foxtrot\nGolf'
.This PR enables the expected behaviour.