Skip to content

Commit

Permalink
Update Markdown image, avoid given height when width is present.
Browse files Browse the repository at this point in the history
  • Loading branch information
huacnlee committed Aug 30, 2023
1 parent 61ea467 commit 046e049
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion feishu-docx/src/markdown_renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ export class MarkdownRenderer extends Renderer {
if (image.width) {
el.setAttribute('width', image.width.toString());
}
if (image.height) {
// Only give height when width is not given
if (!image.width && image.height) {
el.setAttribute('height', image.height.toString());
}
if (align && align != 'left') {
Expand Down

0 comments on commit 046e049

Please sign in to comment.