trackdown icon indicating copy to clipboard operation
trackdown copied to clipboard

[BUG] trackdown wrongly highlights text in between inline chunks that have a `$` in them

Open arnaudgallou opened this issue 1 year ago • 0 comments

For example, in the following case:

```{r}
foo <- list(x = 1, y = 2)
```

Blah blah `r foo$x` blah blah `r foo$y`.

This is because trackdown interprets anything enclosed in a pair of non-escaped $ as inline equations.

Also, because \S consumes a character, trackdown currently only detects inline equations that have at least 3 characters in them.

Considering the following text:

$x$ blah blah ($\sigma$)

trackdown will highlight $x$ blah blah ($

I won't have time to do it this week but I can make a pull request the week after to fix it if you want. I could also take the opportunity to simplify/improve some regex.

arnaudgallou avatar Jun 26 '23 20:06 arnaudgallou