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

Open
wants to merge 1 commit into
base: main
Choose a base branch
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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤞 phase/open Post is being triaged manually
Development

Successfully merging this pull request may close these issues.

2 participants