swyddfa / esbonio

A language server for working with Sphinx projects.
https://docs.esbon.io/
121 stars 21 forks source link

`ValueError` when typing directive options in MyST #800

Closed alcarney closed 3 weeks ago

alcarney commented 2 months ago

Expected behavior

When typing something like

```{eval-rst}

.. autoclass:: my.module.Class
   :members:


There are a bunch of `ValueErrors` in the logs from the `_render_myst_role_with_text_edit` function due to it trying to create a `Position` instance with a negative line or character value.

Thankfully error handling elsewhere in the server prevents this from being a major issue

### Actual behavior

`ValueErrors` should not be raised

### Log output

_No response_

### (Optional) Settings from conf.py

_No response_