Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit651d9a2

Browse files
committed
fix: 🐛 split correctly numbered lists
Issues:#35
1 parentdb7584f commit651d9a2

File tree

7 files changed

+474
-445
lines changed

7 files changed

+474
-445
lines changed

‎fixtures/json/list-ordered.json‎

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"type":"root",
3+
"children": [
4+
{
5+
"type":"list",
6+
"len":20,
7+
"children": [
8+
{
9+
"type":"listItem",
10+
"loose":false,
11+
"checked":null,
12+
"children": [
13+
{
14+
"type":"paragraph",
15+
"len":6,
16+
"children": [
17+
{
18+
"type":"text",
19+
"len":6,
20+
"value":"Item 1"
21+
}
22+
]
23+
}
24+
]
25+
},
26+
{
27+
"type":"listItem",
28+
"loose":false,
29+
"checked":null,
30+
"children": [
31+
{
32+
"type":"paragraph",
33+
"len":7,
34+
"children": [
35+
{
36+
"type":"text",
37+
"len":6,
38+
"value":"Item 2"
39+
}
40+
]
41+
}
42+
]
43+
}
44+
],
45+
"ordered":true,
46+
"start":1,
47+
"loose":false
48+
}
49+
],
50+
"len":20
51+
}

‎fixtures/json/multiple-paragraphs.json‎

Lines changed: 85 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -108,124 +108,106 @@
108108
"children": [
109109
{
110110
"type":"paragraph",
111-
"len":104,
111+
"len":103,
112112
"children": [
113113
{
114114
"type":"text",
115115
"len":103,
116116
"value":"Supports bare module specifiers: This is the npm standard, and modern tooling like bundlers support it."
117117
}
118118
]
119-
},
119+
}
120+
]
121+
},
122+
{
123+
"type":"listItem",
124+
"loose":false,
125+
"checked":null,
126+
"children": [
120127
{
121-
"type":"list",
122-
"len":325,
128+
"type":"paragraph",
129+
"len":150,
123130
"children": [
124131
{
125-
"type":"listItem",
126-
"loose":false,
127-
"checked":null,
132+
"type":"text",
133+
"len":17,
134+
"value":"Supports dynamic"
135+
},
136+
{
137+
"type":"inlineCode",
138+
"len":10,
139+
"value":"import()",
140+
"wrap":"`"
141+
},
142+
{
143+
"type":"text",
144+
"len":12,
145+
"value":": This is a"
146+
},
147+
{
148+
"type":"link",
149+
"len":67,
128150
"children": [
129151
{
130-
"type":"paragraph",
131-
"len":151,
132-
"children": [
133-
{
134-
"type":"text",
135-
"len":17,
136-
"value":"Supports dynamic"
137-
},
138-
{
139-
"type":"inlineCode",
140-
"len":10,
141-
"value":"import()",
142-
"wrap":"`"
143-
},
144-
{
145-
"type":"text",
146-
"len":12,
147-
"value":": This is a"
148-
},
149-
{
150-
"type":"link",
151-
"len":67,
152-
"children": [
153-
{
154-
"type":"text",
155-
"len":16,
156-
"value":"stage 3 proposal"
157-
}
158-
],
159-
"url":"https://github.com/tc39/proposal-dynamic-import"
160-
},
161-
{
162-
"type":"text",
163-
"len":44,
164-
"value":" which allows dynamically importing modules."
165-
}
166-
]
167-
},
152+
"type":"text",
153+
"len":16,
154+
"value":"stage 3 proposal"
155+
}
156+
],
157+
"url":"https://github.com/tc39/proposal-dynamic-import"
158+
},
159+
{
160+
"type":"text",
161+
"len":44,
162+
"value":" which allows dynamically importing modules."
163+
}
164+
]
165+
}
166+
]
167+
},
168+
{
169+
"type":"listItem",
170+
"loose":false,
171+
"checked":null,
172+
"children": [
173+
{
174+
"type":"paragraph",
175+
"len":166,
176+
"children": [
177+
{
178+
"type":"text",
179+
"len":9,
180+
"value":"Supports"
181+
},
182+
{
183+
"type":"inlineCode",
184+
"len":17,
185+
"value":"import.meta.url",
186+
"wrap":"`"
187+
},
188+
{
189+
"type":"text",
190+
"len":12,
191+
"value":": This is a"
192+
},
193+
{
194+
"type":"link",
195+
"len":64,
196+
"children": [
168197
{
169-
"type":"list",
170-
"len":170,
171-
"children": [
172-
{
173-
"type":"listItem",
174-
"loose":false,
175-
"checked":null,
176-
"children": [
177-
{
178-
"type":"paragraph",
179-
"len":166,
180-
"children": [
181-
{
182-
"type":"text",
183-
"len":9,
184-
"value":"Supports"
185-
},
186-
{
187-
"type":"inlineCode",
188-
"len":17,
189-
"value":"import.meta.url",
190-
"wrap":"`"
191-
},
192-
{
193-
"type":"text",
194-
"len":12,
195-
"value":": This is a"
196-
},
197-
{
198-
"type":"link",
199-
"len":64,
200-
"children": [
201-
{
202-
"type":"text",
203-
"len":16,
204-
"value":"stage 3 proposal"
205-
}
206-
],
207-
"url":"https://github.com/tc39/proposal-import-meta"
208-
},
209-
{
210-
"type":"text",
211-
"len":63,
212-
"value":" which allows modules to read their location (filepath or URL)."
213-
}
214-
]
215-
}
216-
]
217-
}
218-
],
219-
"ordered":true,
220-
"start":1,
221-
"loose":false
198+
"type":"text",
199+
"len":16,
200+
"value":"stage 3 proposal"
222201
}
223-
]
202+
],
203+
"url":"https://github.com/tc39/proposal-import-meta"
204+
},
205+
{
206+
"type":"text",
207+
"len":63,
208+
"value":" which allows modules to read their location (filepath or URL)."
224209
}
225-
],
226-
"ordered":true,
227-
"start":1,
228-
"loose":false
210+
]
229211
}
230212
]
231213
}

‎fixtures/md/list-ordered.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
1. Item 1
2+
2. Item 2

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp