From 2e43d505a4e54f8a760f5997c5d20e266ffc7c7c Mon Sep 17 00:00:00 2001
From: "Kenneth Benzie (Benie)" <benie@infektor.net>
Date: Sun, 8 Jan 2017 11:02:34 +0000
Subject: [PATCH] Make json syntax embed aware

---
 syntax/json.vim | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/syntax/json.vim b/syntax/json.vim
index c3a1ea5..25a462d 100644
--- a/syntax/json.vim
+++ b/syntax/json.vim
@@ -1,5 +1,8 @@
-if exists("b:current_syntax")
-  finish
+if !exists("main_syntax")
+  if exists("b:current_syntax")
+    finish
+  endif
+  let main_syntax = 'json'
 endif
 
 syn cluster jsonValue contains=jsonString,jsonNumber,jsonObject,jsonArray,jsonBoolean,jsonNull
@@ -31,3 +34,6 @@ hi default link jsonColon Delimiter
 hi default link jsonComma Delimiter
 
 let b:current_syntax = 'json'
+if main_syntax == 'json'
+  unlet main_syntax
+endif