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

Adds support for colons in directive names #19

Closed
wants to merge 1 commit into from

Conversation

maximilliangeorge
Copy link

Initial checklist

  • I read the support docs
  • I read the contributing guide
  • I agree to follow the code of conduct
  • I searched issues and couldn’t find anything (or linked relevant results below)
  • If applicable, I’ve added docs and tests

Description of changes

This PR adds support for colons within a leaf directory name. This syntax is helpful to create namespaced methods, like so: ::hello:alice and ::hello:bob.

I needed this for a particular use case and wasn't planning on submitting a PR to the original repo. In honesty, it probably shouldn't be merged since it isn't according to the common spec. Still, I'm submitting it here for transparency and interesting conversations.

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels May 6, 2023
@wooorm
Copy link
Member

wooorm commented May 9, 2023

I like this because JSX/XML/HTML also support a “namespace” (:svg:rect).
I dislike this because it is close to conflicting with gemoji shortcodes (see also this related fix) in the text variant (:wave:how are you?). It’s probably not common to use a word directly after a gemoji, but gemoji are very common, so I’d imagine it exists in the wild.

If a colon was supported, I think we shouldn’t allow them arbitrarily: :a::::::::::::::::b seems weird. Instead, I think I’d like them to work as “two” names, with a single colon in between, and that dashes or underscores cannot be used to end each name part (so :a-:b would not be ok).

@wooorm
Copy link
Member

wooorm commented Feb 5, 2025

I needed this for a particular use case and wasn't planning on submitting a PR to the original repo. In honesty, it probably shouldn't be merged since it isn't according to the common spec. Still, I'm submitting it here for transparency and interesting conversations.

Coming back to this, I too have some doubts. How far colons should go, if they should go. So, closing for now. But, I do welcome hearing more use cases!

@wooorm wooorm closed this Feb 5, 2025
@wooorm wooorm added the 🙅 no/wontfix This is not (enough of) an issue for this project label Feb 5, 2025

This comment has been minimized.

@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙅 no/wontfix This is not (enough of) an issue for this project 👎 phase/no Post cannot or will not be acted on
Development

Successfully merging this pull request may close these issues.

2 participants