The current xpath selector is //*//p//text()[not(ancestor::a) and not(ancestor::script) and not(ancestor::*[@data-alink-ignore])].
I was wondering why the xpath starts with //* as //p would be just fine, wouldn't it?
Besides p tags it might be also useful to replace keywords in lists, the following expression will extend the xpath. If the maintainers are interested we may modify the modules default xpath selector to:
//*[self::p|self::li]//text()[not(ancestor::a|ancestor::script|ancestor::*[@data-alink-ignore])]
Otherwise if anybody want to extend the current behavior it could also be done in settings.php by setting:
$config['alinks.settings']['xpathSelector'] = '//*[self::p|self::li]//text()[not(ancestor::a|ancestor::script|ancestor::*[@data-alink-ignore])]';
Comments
Comment #2
osopolarSee also issue on https://stackoverflow.com/q/55190506/880188