Skip to content

Commit

Permalink
Add Lazarus program file glob to Pascal lexer (#1466)
Browse files Browse the repository at this point in the history
This commit adds the `*.lpr` file glob to the Pascal lexer. The `.lpr`
extension is used in modern Pascal for the final program file in a
Pascal project.
  • Loading branch information
Morabaraba committed Mar 24, 2020
1 parent 5f4b818 commit 389c531
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rouge/lexers/pascal.rb
Expand Up @@ -7,7 +7,7 @@ class Pascal < RegexLexer
tag 'pascal'
title "Pascal"
desc 'a procedural programming language commonly used as a teaching language.'
filenames '*.pas'
filenames '*.pas', '*.lpr'

mimetypes 'text/x-pascal'

Expand Down
1 change: 1 addition & 0 deletions spec/lexers/pascal_spec.rb
Expand Up @@ -9,6 +9,7 @@

it 'guesses by filename' do
assert_guess :filename => 'foo.pas'
assert_guess :filename => 'foo.lpr'
end

it 'guesses by mimetype' do
Expand Down

0 comments on commit 389c531

Please sign in to comment.