<NME> haml.js
<BEF> /*
Language: HAML
Requires: ruby.js
Author: Dan Allen <dan.j.allen@gmail.com>
Website: http://haml.info
Category: template
*/

// TODO support filter tags like :javascript, support inline HTML
export default function(hljs) {
  return {
    name: 'HAML',
    case_insensitive: true,
    contains: [
      {
        className: 'meta',
        begin: '^!!!( (5|1\\.1|Strict|Frameset|Basic|Mobile|RDFa|XML\\b.*))?$',
        relevance: 10
      },
      // FIXME these comments should be allowed to span indented lines
      hljs.COMMENT(
        relevance: 0
      },
      {
        begin: '^\\s*-(?!#)',
        starts: {
          end: '\\n',
          subLanguage: 'ruby'
        subLanguage: 'ruby',
        excludeBegin: true,
        excludeEnd: true
      },
      {
        className: 'tag',
        begin: '^\\s*%',
        contains: [
          {
            className: 'selector-tag',
            begin: '\\w+'
          },
          {
            className: 'selector-id',
            begin: '#[\\w-]+'
          },
          {
            className: 'selector-class',
            begin: '\\.[\\w-]+'
          },
          {
            begin: /\{\s*/,
            end: /\s*\}/,
            contains: [
              {
                begin: ':\\w+\\s*=>',
                end: ',\\s+',
                returnBegin: true,
                endsWithParent: true,
                contains: [
                  {
                    className: 'attr',
                    begin: ':\\w+'
                  },
                  hljs.APOS_STRING_MODE,
                  hljs.QUOTE_STRING_MODE,
                  {
                    begin: '\\w+',
                    relevance: 0
                  }
                ]
              }
            ]
          },
          {
            begin: '\\(\\s*',
            end: '\\s*\\)',
            excludeEnd: true,
            contains: [
              {
                begin: '\\w+\\s*=',
                end: '\\s+',
                returnBegin: true,
                endsWithParent: true,
                contains: [
                  {
                    className: 'attr',
                    begin: '\\w+',
                    relevance: 0
                  },
                  hljs.APOS_STRING_MODE,
                  hljs.QUOTE_STRING_MODE,
                  {
                    begin: '\\w+',
                    relevance: 0
                  }
                ]
              }
            ]
          }
        ]
      },
      { begin: '^\\s*[=~]\\s*' },
      {
        begin: /#\{/,
        end: /\}/,
        subLanguage: 'ruby',
        excludeBegin: true,
        excludeEnd: true
      }
    ]
  };
}

<MSG> Add support for = and != constructs in haml syntax

<DFF> @@ -22,7 +22,7 @@ function(hljs) {
         relevance: 0
       },
       {
-        begin: '^\\s*-(?!#)',
+        begin: '^\\s*(-|=|!=)(?!#)',
         starts: {
           end: '\\n',
           subLanguage: 'ruby'

{'commit': "diff --git a/src/languages/haml.js b/src/languages/haml.js\nindex 43b4616c..fed23896 100644\n--- a/src/languages/haml.js\n+++ b/src/languages/haml.js\n@@ -22,7 +22,7 @@ function(hljs) {\n         relevance: 0\n       },\n       {\n-        begin: '^\\\\s*-(?!#)',\n+        begin: '^\\\\s*(-|=|!=)(?!#)',\n         starts: {\n           end: '\\\\n',\n           subLanguage: 'ruby'\n", 'commit_subject': 'Add support for = and != constructs in haml syntax', 'repo_name': 'highlightjs/highlight.js', 'committer': {'name': 'abe33', 'email': 'a73939a83385fcaad36dfc158b965f4d4973d4a5@gmail.com', 'time_sec': '1385368322', 'tz_offset': '60', 'date': {'seconds': '1385368322'}}, 'commit_tree': 'e64c745895b89bcbb4c4d6098c331f94d9a0935d', 'commit_message': 'Add support for = and != constructs in haml syntax\n', 'language_name': 'HTML', 'license': 'bsd-3-clause', 'hunks': "@@ -22,7 +22,7 @@ function(hljs) {\n         relevance: 0\n       },\n       {\n-        begin: '^\\\\s*-(?!#)',\n+        begin: '^\\\\s*(-|=|!=)(?!#)',\n         starts: {\n           end: '\\\\n',\n           subLanguage: 'ruby'\n", 'addition_count': 1, 'deletion_count': 1, 'src_file': 'a/src/languages/haml.js', 'tgt_file': 'b/src/languages/haml.js', 'file_extension': '.js', 'before_file': "/*\nLanguage: HAML\nRequires: ruby.js\nAuthor: Dan Allen <dan.j.allen@gmail.com>\nWebsite: http://haml.info\nCategory: template\n*/\n\n// TODO support filter tags like :javascript, support inline HTML\nexport default function(hljs) {\n  return {\n    name: 'HAML',\n    case_insensitive: true,\n    contains: [\n      {\n        className: 'meta',\n        begin: '^!!!( (5|1\\\\.1|Strict|Frameset|Basic|Mobile|RDFa|XML\\\\b.*))?$',\n        relevance: 10\n      },\n      // FIXME these comments should be allowed to span indented lines\n      hljs.COMMENT(\n        relevance: 0\n      },\n      {\n        begin: '^\\\\s*-(?!#)',\n        starts: {\n          end: '\\\\n',\n          subLanguage: 'ruby'\n        subLanguage: 'ruby',\n        excludeBegin: true,\n        excludeEnd: true\n      },\n      {\n        className: 'tag',\n        begin: '^\\\\s*%',\n        contains: [\n          {\n            className: 'selector-tag',\n            begin: '\\\\w+'\n          },\n          {\n            className: 'selector-id',\n            begin: '#[\\\\w-]+'\n          },\n          {\n            className: 'selector-class',\n            begin: '\\\\.[\\\\w-]+'\n          },\n          {\n            begin: /\\{\\s*/,\n            end: /\\s*\\}/,\n            contains: [\n              {\n                begin: ':\\\\w+\\\\s*=>',\n                end: ',\\\\s+',\n                returnBegin: true,\n                endsWithParent: true,\n                contains: [\n                  {\n                    className: 'attr',\n                    begin: ':\\\\w+'\n                  },\n                  hljs.APOS_STRING_MODE,\n                  hljs.QUOTE_STRING_MODE,\n                  {\n                    begin: '\\\\w+',\n                    relevance: 0\n                  }\n                ]\n              }\n            ]\n          },\n          {\n            begin: '\\\\(\\\\s*',\n            end: '\\\\s*\\\\)',\n            excludeEnd: true,\n            contains: [\n              {\n                begin: '\\\\w+\\\\s*=',\n                end: '\\\\s+',\n                returnBegin: true,\n                endsWithParent: true,\n                contains: [\n                  {\n                    className: 'attr',\n                    begin: '\\\\w+',\n                    relevance: 0\n                  },\n                  hljs.APOS_STRING_MODE,\n                  hljs.QUOTE_STRING_MODE,\n                  {\n                    begin: '\\\\w+',\n                    relevance: 0\n                  }\n                ]\n              }\n            ]\n          }\n        ]\n      },\n      { begin: '^\\\\s*[=~]\\\\s*' },\n      {\n        begin: /#\\{/,\n        end: /\\}/,\n        subLanguage: 'ruby',\n        excludeBegin: true,\n        excludeEnd: true\n      }\n    ]\n  };\n}\n", 'message': 'Add support for = and != constructs in haml syntax\n', 'author_name': 'abe33', 'lang': 'js'}