indieweb-utils icon indicating copy to clipboard operation
indieweb-utils copied to clipboard

`autolink_tags` function should return substitutions made

Open capjamesg opened this issue 2 years ago • 0 comments

The autolink_tags function presently returns the text provided with substitutes for all tags and person tags made. I think this function should also return:

  1. A list of tags (i.e. #coffee) that were substituted.
  2. A list of person tags (i.e. @jane) that were substituted.

In my static site generator, I use the list of person tags found to add a "People tagged in this article" section to my website. This would not be possible with the autolink_tags function as is because the function only returns the substituted text.

Posting interfaces may also need to retrieve a list of tags for internal reference (i.e. if tags are kept in a metadata field).

capjamesg avatar Oct 10 '22 15:10 capjamesg