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

Configurable Option for Other "Trigger" Character Prefixes Besides Double Hyphen #182

Closed
creativeincode opened this issue Apr 16, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@creativeincode
Copy link

Is your feature request related to a problem? Please describe.
As a developer & writer using Obsidian on various iOS devices, it's frustrating having to turn off "Smart Punctuation" to use this amazing Bible verse plugin! I really miss having double hyphens auto-convert into an "em dash"! 🥲 And I also miss my double quotes automatically getting cleaned up, yet another helpful feature of "Smart Punctuation." Basically, I shouldn't have to disable an incredibly "core" UX feature of iOS to use this Bible plugin.

Describe the solution you'd like

  • I would like to propose "++" as an alternative option to "--" for serving as a selectable trigger character prefix.
  • Modify the "regs.ts" file to add a new "alternative" option for the shortcode regex to use "++" at the front of the pattern being matched instead of the current "--".
  • It'd be nice to have a configurable setting for this in the plugin settings to allow users to switch between different "trigger" characters/prefixes like double plus "++" vs. being locked into "double hyphen" (currently hard-coded in regs.ts). This configurable setting could be implemented as a drop-down, but it at least needs to be a basic toggle switch to allow the user to switch between the current "double hyphen" delimiter and an alternative (e.g. "++") to trigger the verse lookup functionality of the Bible Reference plugin.

Describe alternatives you've considered

  • Other double character sequences could probably be considered as well, as long as they do not conflict with other core Obsidian features or prominent 3rd party Obsidian community plugins!
  • Eventually, we might consider implementing a feature the user to specify their own custom character "prefix" to trigger verse lookup—obviously, that's probably MUCH more involved & complicated to implement as a feature!

Additional context
This essentially solves & provides a solid workaround to the "Smart Punctuation" conflict encountered by iOS users like me who don't want to turn off "Smart Punctuation" and want to continue enjoying the benefits, like "em dash." ☺️

@creativeincode creativeincode added the enhancement New feature or request label Apr 16, 2024
@tim-hub
Copy link
Owner

tim-hub commented Apr 16, 2024

This is a good idea I think.

Similar to another feature request to allow users to customise the trigger.

@tim-hub tim-hub self-assigned this May 15, 2024
@tim-hub
Copy link
Owner

tim-hub commented May 15, 2024

add ++ to make it easy to work on ios for now

image

I will trye to allow user to configure this in the future

@tim-hub
Copy link
Owner

tim-hub commented May 15, 2024

check release 2.5.0

@tim-hub tim-hub closed this as completed May 15, 2024
@creativeincode
Copy link
Author

@tim-hub Thank you for implementing this—it's working great & helping so much! 🙌 God bless you bro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

2 participants