   }
 ]
 repository:
+
+  unbuffered_comments:
+    begin: "^(\\s*)//-"
+    comment: "Unbuffered (pug-only) comments."
+    end: "^(?!(\\1\\s)|\\s*$)"
+    name: "comment.unbuffered.block.pug"
+
+  buffered_comments:
+    begin: "^(\\s*)//"
+    comment: "Buffered (html) comments."
+    end: "^(?!(\\1\\s)|\\s*$)"
+    name: "string.comment.buffered.block.pug"
+    patterns: [
+      {
+        captures:
+          "1":
+            name: "invalid.illegal.comment.comment.block.pug"
+        comment: "Buffered comments inside buffered comments will generate invalid html."
+        match: "^\\s*(//)(?!-)"
+        name: "string.comment.buffered.block.pug"
+      }
+    ]
+
   blocks_and_includes:
     captures:
       "1":

    name: "comment.other.doctype.jade"
  }
  {
    begin: "^(\\s*)//-"
    comment: "Unbuffered (pug-only) comments."
    end: "^(?!(\\1\\s)|\\s*$)"
    name: "comment.unbuffered.block.pug"
  }
  {
    begin: "^(\\s*)//"
    comment: "Buffered (html) comments."
    end: "^(?!(\\1\\s)|\\s*$)"
    name: "string.comment.buffered.block.pug"
    patterns: [
      {
        captures:
          "1":
            name: "invalid.illegal.comment.comment.block.pug"
        comment: "Buffered comments inside buffered comments will generate invalid html."
        match: "^\\s*(//)(?!-)"
        name: "string.comment.buffered.block.pug"
      }
    ]
  }
  {
    begin: "^(\\s*)-$"
    comment: "Unbuffered code block."
    end: "^(?!(\\1\\s)|\\s*$)"

    comment: "All constructs that generally span a single line starting with any number of white-spaces."
    end: "$"
    patterns: [
      {
        include: "#unbuffered_comments"
      }
      {
        include: "#buffered_comments"
      }
      {
        include: "#inline_pug"
      }
