piroor / copy-selected-tabs-to-clipboard

Provides ability to copy title and URL of selected tabs to the clipboard for Firefox 63 and later.
Other
75 stars 15 forks source link

Support Markdown placeholders #36

Closed bb010g closed 1 year ago

bb010g commented 1 year ago

These ensure the Markdown source code is properly escaped.

CommonMark compliant.

(I wrote this patch a while back, but just got around to submitting it. I apologize for the delay.)

piroor commented 1 year ago

Thanks! Hmm, but it looks to introduce too many variations for me. It will make the list of available placeholders too long. Instead I think that introducing functional placeholder like %MD_SAFE(%TITLE%)% is better.

bb010g commented 1 year ago

Sure, I'd be willing to give that a try.

piroor commented 1 year ago

Now I'm writing the parser. I'll comment here after I completely rewrite current features with the new parser, then please create a pull request to support the suggested purpose!

piroor commented 1 year ago

OK, I've done it. Now a new placeholder %HTML_SAFE(...)% (and a shorthand %HTML(...)%) is available. You'll just need to add codes similar to https://github.com/piroor/copy-selected-tabs-to-clipboard/blob/trunk/common/commands.js#L377 .

piroor commented 1 year ago

Finally I've added %MD_SAFE()% and %MD_LINK_TEXT_SAFE()% based on this PR. Thanks a lot!