flosell / iam-policy-json-to-terraform

Small tool to convert an IAM Policy in JSON format into a Terraform aws_iam_policy_document
https://flosell.github.io/iam-policy-json-to-terraform/
Apache License 2.0
774 stars 58 forks source link

Add json syntax highlight #40

Open gordonbondon opened 2 years ago

gordonbondon commented 2 years ago

Prism provides their own live syntax highlight functionality https://live.prismjs.com/ + https://github.com/PrismJS/live, so I decided to give it a try. Results look like this:

https://user-images.githubusercontent.com/9439689/139658916-2b1b9baa-c985-4e25-a5d4-6d2c5d5bd6fd.mov

Fixes #27

flosell commented 2 years ago

Hey @gordonbondon, good start!

One thing I noticed: There seems to be something odd going on with the PrismJS stuff and the underlying textbox. I can see the red spellcheck lines (I think that can be easily disabled) and when selecting I see the underlying text which looks very odd:

https://user-images.githubusercontent.com/540525/139770284-ad4bd3b3-f9bc-4136-bbfc-de740c1ca03d.mov

Also, two minor things: