alistaircol / update-markdown-action

GitHub action to update section of a markdown document
0 stars 0 forks source link

Replace tag word only #3

Open alistaircol opened 1 year ago

alistaircol commented 1 year ago

When there's a tag, e.g. <-- task-open --> in a document it should look for this as a word only.

Some instances in documentation where the tag is mentioned, but surrounded by backticks, it is targeted as the tag.

This should look for surrounding characters and ignore it, it should only find tags in isolation.

alistaircol commented 7 months ago

Could replace contents using regex

(?s)(?<=<!-- foo -->).*?(?=<!-- bar -->)

https://regex101.com/r/5lD1Zn/1