Obsidian-Code-Styler icon indicating copy to clipboard operation
Obsidian-Code-Styler copied to clipboard

Bug: Parsing of line number margin width is not precise in editing mode

Open mayurankv opened this issue 1 year ago • 5 comments

Describe the bug

Steps to reproduce

Set a large line number offset parameter using ln:

```python ln:1000
code here
```

Expected behaviour

The line number gutter margins should all be exactly the same width.

Current behaviour

The line number gutter margins can differ (delimiter lines and lines with less characters than the last line).

Environment

  • Plugin Version: 1.0.0
  • Obsidian Version: 1.3.5
  • Platform: Desktop
  • OS: macOS

Screenshots

Additional context

Due to delay in reading accurate information from DOM in codemirror, the current implementation is the most efficient approach. See here.

mayurankv avatar Jul 08 '23 16:07 mayurankv