Summary
When creating a Feishu document from Markdown using lark-cli docs +create, every fenced code block in the resulting document gets an extra trailing empty line that does not exist in the source Markdown.
Steps to Reproduce
-
Prepare a Markdown file with a fenced code block:
Some text before.
```
line_one
line_two
```
Some text after.
-
Create a Feishu document:
lark-cli docs +create --title "test" --content-file test.md
-
Open the created document in Feishu. The code block renders as:
line_one
line_two
⬇️ (unwanted blank line here)
Expected Behavior
The code block should contain exactly the lines from the source Markdown, with no extra trailing blank line.
Actual Behavior
Every code block has one extra empty line appended at the end. This is cosmetic but noticeable, especially when multiple code blocks are present — each one has the spurious blank line.
Investigation
The Markdown content passed to the API was confirmed correct (no trailing newline in the code block). The extra line appears to be introduced by the Lark OpenAPI document creation endpoint or the CLI's Markdown-to-block conversion layer.
Environment
@larksuite/cli version: 1.0.0
- Platform: Windows 11
- Node.js: installed via npm global
- Brand: feishu
Summary
When creating a Feishu document from Markdown using
lark-cli docs +create, every fenced code block in the resulting document gets an extra trailing empty line that does not exist in the source Markdown.Steps to Reproduce
Prepare a Markdown file with a fenced code block:
Create a Feishu document:
lark-cli docs +create --title "test" --content-file test.mdOpen the created document in Feishu. The code block renders as:
Expected Behavior
The code block should contain exactly the lines from the source Markdown, with no extra trailing blank line.
Actual Behavior
Every code block has one extra empty line appended at the end. This is cosmetic but noticeable, especially when multiple code blocks are present — each one has the spurious blank line.
Investigation
The Markdown content passed to the API was confirmed correct (no trailing newline in the code block). The extra line appears to be introduced by the Lark OpenAPI document creation endpoint or the CLI's Markdown-to-block conversion layer.
Environment
@larksuite/cliversion: 1.0.0