bugfix: inline math style error in list item (#405)

This commit is contained in:
Ran Luo 2018-06-28 10:14:14 +08:00 committed by GitHub
parent 96e328501f
commit 610530408b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View File

@ -100,6 +100,7 @@ export const CLASS_OR_ID = genUpper2LowerKeyHash([
'AG_OUTPUT_REMOVE',
'AG_EMOJI_MARKER',
'AG_NOTEXT_LINK',
'AG_LIST_ITEM',
'AG_ORDER_LIST',
'AG_ORDER_LIST_ITEM',
'AG_BULLET_LIST',

View File

@ -417,13 +417,18 @@ span.ag-multiple-math-line:first-of-type:empty::after {
figure,
pre.ag-html-block,
div.ag-function-html,
pre.ag-code-block {
pre.ag-code-block,
li.ag-list-item > p.ag-paragraph {
position: relative;
display: inline-flex;
box-sizing: border-box;
width: 100%;
}
li.ag-list-item > p.ag-paragraph > span {
width: 100%;
}
pre.ag-code-block {
margin: 1rem 0;
padding: 0 .5rem;

View File

@ -55,6 +55,7 @@ export default function renderContainerBlock (block, cursor, activeBlocks, match
Object.assign(data.attrs, { title })
}
if (block.type === 'li' && block.listItemType) {
selector += `.${CLASS_OR_ID['AG_LIST_ITEM']}`
switch (block.listItemType) {
case 'order':
selector += `.${CLASS_OR_ID['AG_ORDER_LIST_ITEM']}`