pub fn is_path_reference(reference: &str) -> boolExpand description
Whether reference, an @ token without its @, looks like a path by
its shape alone: it holds a /, or ends in a dot and one to four
letters or digits. attachments reports such a token as missing when
no file is there; any other token (a mention, an address, or a file
with no extension) is attached only when its file is there, and is
otherwise left as text.
use rig_tools::attach::is_path_reference;
assert!(is_path_reference("src/main.rs"));
assert!(is_path_reference("notes.md"));
assert!(!is_path_reference("reviewer"));