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 the Oz language #1680

Closed
wants to merge 1 commit into from
Closed

Add support for the Oz language #1680

wants to merge 1 commit into from

Conversation

layus
Copy link

@layus layus commented Jan 24, 2018

This adds minimal support for Oz.

@joshgoebel
Copy link
Member

@layus

First of all, truly sorry for the long delay in anyone responding to this PR.

Thank you so much for desiring to contribute and writing a language grammar. Unfortunately, we currently are no longer accepting new languages into the core repository. The existing maintainers simply don't have time to maintain new languages (fixing bugs, dealing with issues, etc). We'd still love to host your language as a 3rd party module though - if you're willing to help maintain it.

It's easy to turn your language into a module that anyone who likes can easily integrate with Highlight.js using a single line of code:

<script src="/path/to/highlight.min.js"></script>
<!-- they'd simply add your language modules -->
<script src="/path/to/highlightjs-oz.js"></script> 
<script>hljs.initHighlightingOnLoad();</script>

It's also possible for users to rebuild the highlight.js library to include specific 3rd party modules, all in a single file (vs loading a bunch of 3rd party languages one at a time).

If you'd like to become the maintainer for this language then we're happy to create a new repository in the highlightjs organization and host the repository there. That assumes you'd be open to reviewing issues and fixing bugs as they arise. You're also welcome to host the repo yourself and we'll link to it from our README.

There isn't much in the way of how to docs on this yet, but there are sample repositories and it's honestly pretty easy. We're still fleshing out an official "spec" for 3rd party modules, but even after that's done it should require minimal changes from the examples we have already. IE, if you wanted to get started now there isn't any big reason to wait.

My own robots.txt grammar repository is a great, simple example:

https://github.com/highlightjs/highlightjs-robots-txt

If you have any questions feel free to ask.

@joshgoebel
Copy link
Member

Closing for inactivity; (also finally cleaning all these old PRs out for the new year).

As mentioned above if you're interested in becoming the maintainer of a 3rd party module, please respond [whenever you find time] and we'd be happy to help you get started.

@joshgoebel joshgoebel closed this Jan 2, 2020
@layus
Copy link
Author

layus commented Jan 2, 2020

Hi @yyyc514,

I am all fine to be the maintainer of a plugin hosted at https://github.com/highlightjs.

What needs to be done ?

@joshgoebel
Copy link
Member

I created a repo for you: https://github.com/highlightjs/highlightjs-oz

Take a look at my own simple robots grammar for a pattern to follow:

https://github.com/highlightjs/highlightjs-robots-txt


If you check out the repository INSIDE your highlight.js checkout, you can use the new build process (#2312) to generate a CDN module for you:

cd highlight.js
mkdir extra
cd extra
git clone [your repository]
cd ..
node ./tools/build.js -t cdn

Just building the CDN build (which will build ALL of the languages, including yours) will also helpful build a ready-to-go CDN module for you inside your own repos dist folder.

If that's too much you can just go without the dist folder until this is all folder into an actual release later this month.

layus added a commit to highlightjs/highlightjs-oz that referenced this pull request Jan 2, 2020
Imported from the original PR at highlightjs/highlight.js#1680
@layus
Copy link
Author

layus commented Jan 2, 2020

Thanks !

I stumbled on the fact that your new build system is not merged yet, but finally made it work (after updating node from v8 to v10...)

I did not find how to run tests, but this was okay back in the time of the PR. It should still be good enough.

@layus layus deleted the oz branch January 2, 2020 15:14
@joshgoebel
Copy link
Member

If you have detect and markup files in the proper locations then just running the full suite will also run your tests. In the future we hope to allow running them individually, easily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants