@feishux/doc-to-md
Advanced tools
Comparing version 0.1.0 to 0.2.0
@@ -5,2 +5,3 @@ 'use strict'; | ||
var shared = require('@feishux/shared'); | ||
var emoji = require('./emoji.js'); | ||
@@ -137,7 +138,18 @@ const _unsupported = (type) => { | ||
var _a; | ||
const str = (_a = block.children) === null || _a === void 0 ? void 0 : _a.map((id) => { | ||
const childBlock = blocks.find((item) => item.block_id === id); | ||
return childBlock.text.elements[0].text_run.content; | ||
}).join('\n'); | ||
return md.quote(str); | ||
if (block.block_type === 15 /* IBlockType.quote */) { | ||
const str = block.quote.elements[0].text_run.content; | ||
return md.quote(str); | ||
} | ||
else { | ||
const str = (_a = block.children) === null || _a === void 0 ? void 0 : _a.map((id, index) => { | ||
var _a; | ||
const childBlock = blocks.find((item) => item.block_id === id); | ||
if (index === 0 && block.block_type === 19 /* IBlockType.callout */ && ((_a = block.callout) === null || _a === void 0 ? void 0 : _a.emoji_id)) { | ||
const emoji$1 = emoji.getEmojiChar(block.callout.emoji_id); | ||
return emoji$1 + ' ' + childBlock.text.elements[0].text_run.content; | ||
} | ||
return childBlock.text.elements[0].text_run.content; | ||
}).join('\n'); | ||
return md.quote(str); | ||
} | ||
}; | ||
@@ -144,0 +156,0 @@ /** |
{ | ||
"name": "@feishux/doc-to-md", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "FeiShu doc to md", | ||
@@ -32,4 +32,4 @@ "keywords": [ | ||
"markdown-table": "^2.0.0", | ||
"@feishux/api": "0.1.0", | ||
"@feishux/shared": "0.1.0" | ||
"@feishux/api": "0.2.0", | ||
"@feishux/shared": "0.2.0" | ||
}, | ||
@@ -36,0 +36,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
127376
21
2462
1
+ Added@feishux/api@0.2.0(transitive)
+ Added@feishux/shared@0.2.0(transitive)
- Removed@feishux/api@0.1.0(transitive)
- Removed@feishux/shared@0.1.0(transitive)
Updated@feishux/api@0.2.0
Updated@feishux/shared@0.2.0