@@ -28,6 +28,9 @@ async function notionColumnListToMarkdown(
2828 notionClient : Client ,
2929 block : ListBlockChildrenResponseResult
3030) : Promise < string > {
31+ // Enhance: The @notionhq /client, which uses the official API, cannot yet get at column formatting information (column_ratio)
32+ // However https://github1s.com/NotionX/react-notion-x/blob/master/packages/react-notion-x/src/block.tsx#L528 can get it.
33+
3134 const { id, has_children } = block as any ; // "any" because the notion api type system is complex with a union that don't know how to help TS to cope with
3235
3336 if ( ! has_children ) return "" ;
@@ -40,14 +43,15 @@ async function notionColumnListToMarkdown(
4043
4144 const columns : string [ ] = await Promise . all ( column_list_promise ) ;
4245
43- return `<div class='column_list'> ${ columns . join ( "\n\n" ) } </div>` ;
46+ return `<div class='notion-row'>\n ${ columns . join ( "\n\n" ) } \n </div>` ;
4447}
4548
4649async function notionColumnToMarkdown (
4750 notionToMarkdown : NotionToMarkdown ,
4851 notionClient : Client ,
4952 block : ListBlockChildrenResponseResult
5053) : Promise < string > {
54+ console . log ( JSON . stringify ( block ) ) ;
5155 const { id, has_children } = block as any ; // "any" because the notion api type system is complex with a union that don't know how to help TS to cope with
5256
5357 if ( ! has_children ) return "" ;
@@ -60,7 +64,11 @@ async function notionColumnToMarkdown(
6064
6165 const childrenStrings : string [ ] = await Promise . all ( childrenPromise ) ;
6266
63- return `<div class='column'>${ childrenStrings . join ( "\n\n" ) } </div>` ;
67+ // note: it would look better in the markup with \n, but that
68+ // causes notion-to-md to give us ":::A" instead of \n for some reason.
69+ return `<div class='notion-column'>\n\n${ childrenStrings . join (
70+ "\n\n"
71+ ) } \n\n</div>`;
6472}
6573
6674async function getBlockChildren (
0 commit comments