obsidian-shiki-plugin icon indicating copy to clipboard operation
obsidian-shiki-plugin copied to clipboard

showLineNumbers feature does not work for code blocks inside of callouts

Open Trikzon opened this issue 1 year ago • 1 comments

  • [x] The Plugin is up to date
  • [x] Obsidian is up to date

Describe the bug When a code block is put inside of a callout with the showLineNumbers feature enabled, line numbers are not rendered.

To Reproduce Try the following markdown:

```python showLineNumbers
print("Hello World!")
```

> [!note]
> ```python showLineNumbers
> print("Hello World!")
> ```

It renders like image

Expected behavior Line numbers should render in callouts when the feature is enabled.

Occurs on

  • [ ] Windows
  • [x] macOS
  • [ ] Linux
  • [ ] Android
  • [ ] iOS

Plugin version 0.2.4

Trikzon avatar Apr 02 '24 23:04 Trikzon

This seems to be a limitation of the Obsidian API. The section info for code blocks in callouts and quotes is null in LP and the section of the callout/quote in reading mode, so there is no way for me to get the code block meta string.

mProjectsCode avatar Apr 04 '24 20:04 mProjectsCode