Skip to content

Commit 1cb0ed9

Browse files
committed
Add support for column lists and columns
1 parent 10a7880 commit 1cb0ed9

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/transformers/notion-block-to-markdown.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,33 @@ exports.notionBlockToMarkdown = (block, lowerTitleLevel) => {
133133
return `${EOL_MD}---${EOL_MD}`
134134
}
135135

136+
// Column List
137+
if (block.type == "column_list") {
138+
return [
139+
EOL_MD,
140+
"<ColumnList>",
141+
EOL_MD,
142+
markdown,
143+
EOL_MD,
144+
"</ColumnList>",
145+
EOL_MD
146+
].join("")
147+
}
148+
149+
// Column
150+
if (block.type == "column") {
151+
return [
152+
"<Column>",
153+
EOL_MD,
154+
EOL_MD,
155+
markdown,
156+
EOL_MD,
157+
EOL_MD,
158+
"</Column>",
159+
EOL_MD
160+
].join("")
161+
}
162+
136163
// Unsupported types.
137164
// TODO: Add support for callouts, internal video, and files
138165
return [EOL_MD, `<!-- This block type '${block.type}' is not supported yet. -->`, EOL_MD].join("")

0 commit comments

Comments
 (0)