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

highlight js not supporting terraform in update #299

Open
smwilson1230 opened this issue Apr 22, 2020 · 3 comments
Open

highlight js not supporting terraform in update #299

smwilson1230 opened this issue Apr 22, 2020 · 3 comments

Comments

@smwilson1230
Copy link

Terraform does not seem to be supported in the latest version of highlight that you have in gitpitch. Is there a way to add custom language files or a PR process to request them?

@gitpitch
Copy link
Owner

Hi Stephen. So GitPitch is currently using highlight.js v9.15.8. Using the full core language bundle. But looking at the list of supported languages it seems that Terraform support is maintained as an external project. So is not currently included in the core bundle used by GitPitch.

To your specific questions:

Is there a way to add custom language files or a PR process to request them?

There is no way for an end user to add support for a custom language. Mainly because it would require the end user to be able to bundle custom JavaScript code with their deck. And the loading of custom JavaScript is forbidden for security reasons. So an RFE like this issue thread is the way to go if you want to request syntax highlighting support for a new (non-core) language.

Looking at the highlight.js repo it appears to have just pushed a major release v10.0.1. And looking at the release notes this major release contains a number of breaking changes.

So I will need to do a few things before I decide if or when Terraform support could be added. First, I'd like to understand what's involved in upgrading GitPitch to use the new v10.0.0x core bundle. And based on what I learn, decide whether to upgrade to v10.0.x or to simply patch the existing v9.15.x bundle.

I have flagged this thread as an RFE for Terraform syntax highlighting support and will provide an update once I know more.

@gitpitch
Copy link
Owner

@smwilson1230 a quick request. Can you please add a few sample Terraform code snippets to this thread so I have good representative code blocks to use for testing. Thanks, David.

@smwilson1230
Copy link
Author

smwilson1230 commented Apr 28, 2020

auto_auth {
   method "aws" {
       mount_path = "auth/aws"
       config = {
           type = "iam"
           role = "dev-role-iam"
       }
   }
}

there are also several examples at terraform.io/docs

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

No branches or pull requests

2 participants