Skip to content

Commit

Permalink
fix: improve openedge abl langage (#1843)
Browse files Browse the repository at this point in the history
* fix: improve openedge abl langage

* Add new lines and trim excessive ones

---------

Co-authored-by: Tan Le <numbat@fastmail.com>
  • Loading branch information
clement-brodu and tancnle authored Apr 2, 2023
1 parent d3df530 commit be4d825
Show file tree
Hide file tree
Showing 5 changed files with 718 additions and 378 deletions.
7 changes: 7 additions & 0 deletions lib/rouge/guessers/disambiguation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ def match?(filename)

disambiguate '*.cls' do
next TeX if matches?(/\A\s*(?:\\|%)/)
next OpenEdge if matches?(/(no\-undo|BLOCK\-LEVEL|ROUTINE\-LEVEL|&ANALYZE\-SUSPEND)/i)
next Apex
end

Expand All @@ -139,6 +140,12 @@ def match?(filename)

Puppet
end

disambiguate '*.p' do
next Prolog if contains?(':-')
next Prolog if matches?(/\A\w+(\(\w+\,\s*\w+\))*\./)
next OpenEdge
end
end
end
end
Loading

0 comments on commit be4d825

Please sign in to comment.