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

Can string/keyword harvesting be parameterized? #99

Open
raystubbs opened this issue Apr 24, 2024 · 2 comments
Open

Can string/keyword harvesting be parameterized? #99

raystubbs opened this issue Apr 24, 2024 · 2 comments
Labels
contribution welcome An extra hand is needed enhancement New feature or request

Comments

@raystubbs
Copy link

Any chance these can be parameterized?

; girouette.processor:88-95
(defn- string->classes [s]
  (->> (str/split s #"\s+")
       (remove str/blank?)))

(defn- kw->classes [kw]
  (->> (name kw)
       (re-seq #"\.[^\.#]+")
       (map (fn [s] (subs s 1)))))

I'd prefer to use keywords over strings for conditional classes (e.g :class (if something [:class-1 :class-2] [:class-3])). Not a deal breaker, this project is awesome! But this would make it that much more awesome, I think.

@green-coder
Copy link
Owner

If it doesn't break anything for the current users, a PR is welcome.

@green-coder green-coder added enhancement New feature or request contribution welcome An extra hand is needed labels Apr 26, 2024
@raystubbs
Copy link
Author

Sweet, I may do that when I find a second.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution welcome An extra hand is needed enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants