Skip to content

Commit 9126aa3

Browse files
committed
fixes broken labels for ordered lists (foliojs#1517)
1 parent 473d5fe commit 9126aa3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/mixins/text.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,11 @@ export default {
153153
}
154154
};
155155

156-
const drawListItem = function(listItem) {
156+
const drawListItem = function(listItem, i) {
157157
wrapper = new LineWrapper(this, options);
158158
wrapper.on('line', this._line);
159159

160160
level = 1;
161-
let i = 0;
162161
wrapper.once('firstLine', () => {
163162
let item, itemType, labelType, bodyType;
164163
if (options.structParent) {
@@ -225,7 +224,7 @@ export default {
225224

226225

227226
for (let i = 0; i < items.length; i++) {
228-
drawListItem.call(this, items[i]);
227+
drawListItem.call(this, items[i], i);
229228
}
230229

231230
return this;

0 commit comments

Comments
 (0)