Skip to content

Commit 49504c3

Browse files
committed
feat: add support for highlight .cpy and .cpb files as COBOL
1 parent 3332a9c commit 49504c3

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/rouge/lexers/cobol.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class COBOL < RegexLexer
77
title 'COBOL'
88
desc 'COBOL (Common Business-Oriented Language) programming language'
99
tag 'cobol'
10-
filenames '*.cob', '*.cbl'
10+
filenames '*.cob', '*.cbl', '*.cpy', '*.cpb'
1111
mimetypes 'text/x-cobol'
1212

1313
identifier = /\p{Alpha}[\p{Alnum}-]*/

spec/lexers/cobol_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@
7070
it 'guesses by filename' do
7171
assert_guess :filename => 'foo.cob'
7272
assert_guess :filename => 'foo.cbl'
73+
assert_guess :filename => 'foo.cpy'
74+
assert_guess :filename => 'foo.cpb'
7375
end
7476

7577
it 'guesses by mimetype' do

0 commit comments

Comments
 (0)