lib/rouge/lexers/tsx.rb in rouge-3.19.0 vs lib/rouge/lexers/tsx.rb in rouge-3.20.0
- old
+ new
@@ -5,16 +5,23 @@
module Lexers
load_lexer 'jsx.rb'
load_lexer 'typescript/common.rb'
class TSX < JSX
- include TypescriptCommon
+ extend TypescriptCommon
- title 'TypeScript'
- desc 'tsx'
+ title 'TSX'
+ desc 'TypeScript-compatible JSX (www.typescriptlang.org/docs/handbook/jsx.html)'
tag 'tsx'
filenames '*.tsx'
+
+ prepend :element_name do
+ rule %r/(\w+)(,)/ do
+ groups Name::Other, Punctuation
+ pop! 3
+ end
+ end
end
end
end