Skip to content

Commit

Permalink
fix: xtra space from numbered list item (#724)
Browse files Browse the repository at this point in the history
  • Loading branch information
lming authored Mar 7, 2024
1 parent 8996fba commit ce391a8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class DocumentMarkdownDecoder extends Converter<String, Document> {
return numberedListNode(
attributes: {
'delta':
decoder.convert(line.substring(line.indexOf('.') + 1)).toJson(),
decoder.convert(line.substring(line.indexOf('.') + 2)).toJson(),
},
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ void main() async {
"data": {
"delta": [
{
"insert": " list item 1"
"insert": "list item 1"
}
]
}
Expand All @@ -307,7 +307,7 @@ void main() async {
"data": {
"delta": [
{
"insert": " list item 2"
"insert": "list item 2"
}
]
}
Expand Down Expand Up @@ -739,15 +739,15 @@ void main() async {
{
"type": "numbered_list",
"children": [
{"type": "numbered_list", "data": {"delta": [{"insert": " Which"}]}},
{"type": "numbered_list", "data": {"delta": [{"insert": " Is"}]}},
{"type": "numbered_list", "data": {"delta": [{"insert": " Nested"}]}}
{"type": "numbered_list", "data": {"delta": [{"insert": "Which"}]}},
{"type": "numbered_list", "data": {"delta": [{"insert": "Is"}]}},
{"type": "numbered_list", "data": {"delta": [{"insert": "Nested"}]}}
],
"data": {"delta": [{"insert": " Numbered List"}]}
"data": {"delta": [{"insert": "Numbered List"}]}
},
{
"type": "numbered_list",
"data": {"delta": [{"insert": " Back to top level"}]}
"data": {"delta": [{"insert": "Back to top level"}]}
},
{"type": "paragraph", "data": {"delta": []}}
]
Expand Down

0 comments on commit ce391a8

Please sign in to comment.