Skip to content

Commit

Permalink
Add jsx and tsx highlighting modes (#5498)
Browse files Browse the repository at this point in the history
* Add jsx and tsx highlighting modes

* add semicolons
  • Loading branch information
whazor authored Mar 18, 2024
1 parent 9faedf3 commit 099011b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/mode/jsx_highlight_rules.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"use strict";

var oop = require("../lib/oop");
var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;


var JsxHighlightRules = function () {
JavaScriptHighlightRules.call(this, {
jsx: true
});
};
oop.inherits(JsxHighlightRules, JavaScriptHighlightRules);

exports.JsxHighlightRules = JsxHighlightRules;
14 changes: 14 additions & 0 deletions src/mode/tsx_highlight_rules.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"use strict";

var oop = require("../lib/oop");
var TypeScriptHighlightRules = require("./javascript_highlight_rules").TypeScriptHighlightRules;


var TsxHighlightRules = function () {
TypeScriptHighlightRules.call(this, {
jsx: true
});
};
oop.inherits(TsxHighlightRules, TypeScriptHighlightRules);

exports.TsxHighlightRules = TsxHighlightRules;

0 comments on commit 099011b

Please sign in to comment.