A simple addon which, when invoked, will add to a configured field a list of all peer cards that have the same tag, so that they can be displayed in card templates.
This can help your brain connect various related topics when reviewing.
A note is considered a peer if it shares the same tag at the same level in the hierarchy. Tags lower or higher in the hierarchy are not considered peers. If a note has multiple tags in the same hierarchy, it will be considered to be only in the highest.
The peers output is a div containing a list of the sort fields of peer notes. The tags sets output is a list of resolved tag sets.
You can just put these fields on your cards as-is, but you would likely benefit from applying some HTML styling. That is beyond the scope of this addon.
You can configure a regular expression in the config file which will be used to filter the text from the peers. If the regular expression returns nothing, the peer is ignored: otherwise, the script expects there to be a single capture group containing the desired text.
The 'strip' option in the config file controls whether to strip HTML from the peer fields. True by default; if set to false, HTML will not be stripped.
Regex matching occurs before HTML stripping, if enabled. If you have HTML in your peer fields, you will need to account for this if you edit the regular expression.
You can specify a regular expression in the config file to filter tags by: tags that don't match will be ignored.