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

Add support for .cljc clojure file extension #2043

Merged
merged 1 commit into from
Jan 25, 2022
Merged

Add support for .cljc clojure file extension #2043

merged 1 commit into from
Jan 25, 2022

Conversation

dannyfreeman
Copy link
Contributor

.cljc files are clojure source files that run on both clojure and clojurescript runtimes. This PR adds support for formatting .cljc files by adding the .cljc extension to the ClojureLexer.

An example test file was created using this source file from the re-frame project:
https://github.com/day8/re-frame/blob/7199496997cfb226311444f4402d1bda5798af60/src/re_frame/loggers.cljc
I generated the loggers.cljc.output file using pytest tests/examplefiles --update-goldens and visually checked the output with python -m pygments tests/examplefiles/clojure/loggers.cljc

@dannyfreeman
Copy link
Contributor Author

One of the linters failed, and suggested I run make mapfiles. I did so and amended the commit.

@birkenfeld birkenfeld merged commit b72aa84 into pygments:master Jan 25, 2022
@birkenfeld
Copy link
Member

Thanks! (The remaining check would have been fine after a rebase.)

@dannyfreeman dannyfreeman deleted the dannyfreeman/clojure-cljc-support branch January 25, 2022 20:48
@Anteru Anteru added this to the 2.12.0 milestone Feb 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants