mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-27 17:51:09 +00:00
Use Parsoid hack to remove whitespace from replies
Change-Id: I1ad0f5498c3c409df6d4eb2d400a0f714dff9908
This commit is contained in:
parent
cf32465832
commit
9733f72354
|
@ -60,6 +60,12 @@ function addListAtComment( comment ) {
|
||||||
|
|
||||||
function addListItem( list ) {
|
function addListItem( list ) {
|
||||||
var listItem = document.createElement( list.nodeName.toLowerCase() === 'dl' ? 'dd' : 'li' );
|
var listItem = document.createElement( list.nodeName.toLowerCase() === 'dl' ? 'dd' : 'li' );
|
||||||
|
|
||||||
|
// HACK: Setting data-parsoid removes the whitespace after the list item,
|
||||||
|
// which makes nested lists work.
|
||||||
|
// This is undocumented behaviour and probably very fragile.
|
||||||
|
listItem.setAttribute( 'data-parsoid', '{}' );
|
||||||
|
|
||||||
list.appendChild( listItem );
|
list.appendChild( listItem );
|
||||||
return listItem;
|
return listItem;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue