@@ -35,10 +35,6 @@ import type {
3535 Writeable ,
3636} from "./types" ;
3737
38- const CONTENT_WIDTH =
39- sectionPageSizeDefaults . WIDTH -
40- sectionMarginDefaults . LEFT -
41- sectionMarginDefaults . RIGHT ;
4238const ORDERED_LIST_REF = "ordered" ;
4339const TASK_LIST_REF = "task" ;
4440const HYPERLINK_STYLE_ID = "Hyperlink" ;
@@ -269,11 +265,15 @@ export const mdastToDocx = async (
269265 }
270266 return results ;
271267 } ,
268+ width :
269+ sectionPageSizeDefaults . WIDTH -
270+ sectionMarginDefaults . LEFT -
271+ sectionMarginDefaults . RIGHT ,
272272 deco : { } ,
273273 indent : 0 ,
274274 definition : definition ,
275275 footnote,
276- orderedListId : numbering . createId ,
276+ orderedId : numbering . createId ,
277277 } ;
278278
279279 const sections : DocxContent [ ] [ ] = [ [ ] ] ;
@@ -426,7 +426,7 @@ const buildList: NodeBuilder<"list"> = ({ children, ordered }, ctx) => {
426426 reference :
427427 parentList && parentList . meta . type === "ordered"
428428 ? parentList . meta . reference
429- : ctx . orderedListId ( ) ,
429+ : ctx . orderedId ( ) ,
430430 } ;
431431 } else {
432432 meta = { type : "bullet" } ;
@@ -478,7 +478,7 @@ const buildTable: NodeBuilder<"table"> = ({ children, align }, ctx) => {
478478 } ) ;
479479
480480 const columnLength = children [ 0 ] ! . children . length ;
481- const columnWidth = CONTENT_WIDTH / columnLength ;
481+ const columnWidth = ctx . width / columnLength ;
482482
483483 return new Table ( {
484484 columnWidths : Array . from ( { length : columnLength } ) . map ( ( ) => columnWidth ) ,
0 commit comments