stargrey / obsidian-better-codeblock

Add title, line number to Obsidian code block
MIT License
109 stars 10 forks source link

Fix Request: cannot export to pdf due to this plugin #7

Closed Maxlinn closed 2 years ago

Maxlinn commented 2 years ago

Hi there, thanks for bringing this plugin and i really love it. However, when i tried to Exported to PDF as i often do, it tells me failed to export.

I checked console section is developer's mode, traceback mentioned this plugin. A markdown document without any codeblock can be exported successfully. Maybe it caused by other plugins other than this one, but i have no idea what's happening.

Sincerely hope you could help. Exported to PDF is a function i use much often to create handouts. Thanks in advance!

Error screenshot: img Code that mentioned in the trackback of this plugin:

  let codeBlockFirstLine = view.editor.getLine(codeBlock.lineStart);
lethefrost commented 2 years ago

Same issue here, @stargrey any solution? Thank you so much!

stargrey commented 2 years ago

@lethefrost @Maxlinn Sorry for the long wait, this issue may be fixed, but export PDF cannot be linefeed, I found it has different width when export PDF, so I can't measure its height

Maxlinn commented 2 years ago

thanks for this one too! sorry for the late reply!