Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] option "selected_text_only", useful to avoid duplicating title in [%selected_text_only% %title%](%url%) #25

Open
timotheecour opened this issue Aug 11, 2018 · 0 comments · May be fixed by #26

Comments

@timotheecour
Copy link

timotheecour commented Aug 11, 2018

D20200421T183444
I have this default:
[%text% : %title%](%url%)
which works great to get all the context (selected text, page title, and url)
however it's not great for creating link when no text is selected, as it'll result in title being duplicated.

proposal:

add option selected_text_only which solves this problem:
[%selected_text_only% : %title%](%url%)
only drawback is it'll add a : in case no text is selected, but that's better than duplicating the title.

As an enhancement, this could (later...) be supported too:

[%selected_text_only text_that_occurs_conditionally%%title%](%url%)
eg:
[%selected_text_only : %%title%](%url%)
which does the right thing, all the time.

@timotheecour timotheecour changed the title [feature] option "selected_text_only", useful to avoid dup in [%selected_text_only% %title%](%url%) [feature] option "selected_text_only", useful to avoid duplicating title in [%selected_text_only% %title%](%url%) Aug 11, 2018
timotheecour added a commit to timotheecour/CreateLink that referenced this issue Aug 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant