Fix: (link) Don't match against null groups

e.g. in a source block containing Bash shell code like:

  [[ -z $data ]]

The matched groups could be null, since it's not actually an Org link,
so calling STRING-MATCH-P on them would signal an error.

Reported-by: John Wiegley <jwiegley@gmail.com>
This commit is contained in:
Adam Porter 2024-11-06 21:20:30 -06:00
parent 3cfc77d2ff
commit 0e68cc9fac
3 changed files with 60 additions and 51 deletions

View file

@ -555,7 +555,8 @@ Simple links may also be written manually in either sexp or non-sexp form, like:
** 0.8.10-pre
Nothing new yet.
*Fixes*
+ Predicate ~link~ could signal an error when searching text that is mistakenly recognized as an Org link (e.g. Bash double-bracket constructs in a source block). (Thanks to [[https://github.com/jwiegley][John Wiegley]] for reporting.)
** 0.8.9