Closed olivroy closed 8 months ago
Are you sure that regex "\\@\\(\\w+\\-.*?\\)"
is correct? In your example the @fig-weirdooo
does not have parentheses?
You are right, changed it to \\@\\w+\\-[[:graph:]]+
as it can be @fig-w-s
(so anything but space)
I am trying to think of false positives we can get with that regex. For example an email address: jeroen@r-universe.dev
will lose the last part and then just become jeroen
. I am not sure if that is worse or not, I don't remember if/how we currently filter email addresses.
Maybe values <- gsub("\\s\\@\\w+\\-[[:graph:]]+", " ", values)
?
Currently, email addresses are not spell-checked, I think
Since 2.0 :
So my regex is actually useless here, it seems
Yeah we already have this: https://github.com/ropensci/spelling/commit/a22366a4c55539c9f2a8d80df4b5efc0ed82f37c
I think that would already filter out cross references, so you can probably just remove your custom filter? Can you test this?
All good without it. I added a comment for posterity.
Thank you
Thank you guys for this PR! Much appreciated!
@jeroen would you consider to release to CRAN anytime soon? I think that this would be a nice enhancement for the whole community given increasing popularity of Quarto. There is even some advanced progress of package vignettes in .qmd format so this is not only for book type of projects but also packages.
Ok i have released a new version to CRAN now.
Fix #77
A reprex that includes cross-references as well
This is @fig-weirdooo for thiiis ", temp_file )
spelling::spell_check_files(temp_file) WORD FOUND IN eeerrrooorrr file4d5c1a4c6c37.qmd:2 thiiis file4d5c1a4c6c37.qmd:10