Skip to content

Bug: "ln" tag does not apply to read mode correctly #354

@neonfury

Description

@neonfury

Describe the bug

Line control via the "ln" parameter is inconsistent between editing and reading views.
The lines switch on/off correctly in the editing view, but they are not affected in the reading view.

Steps to reproduce

  1. Create a new vault
  2. Install and enable Code Styler
  3. Create a note with the following body:
```sh ln:false
ls .
cat file
```
  1. Notice how removal and addition of the ln:false tag affects the line numbers. Keep the tag in place.
  2. Switch to reading view.
  3. Notice how the line numbers are back, even though they are not supposed to be shown.

Expected behaviour

The ln codeblock tag has to affect both editing and reading views the same way. In case of ln:false, it has to hide line numbers in bot editing and reading views.

Current behaviour

The ln codeblock tag only affects the editing view, leaving the reading view unaffected.

Environment

  • Plugin Version: 1.1.7
  • Obsidian Version: 1.11.4
  • Platform: Desktop
  • OS: Linux
  • Theme: Default
  • CSS Snippets: No

Screenshots

Image Editing view. Image Reading view.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions