lib/rouge/guessers/disambiguation.rb in rouge-3.0.0 vs lib/rouge/guessers/disambiguation.rb in rouge-3.1.0
- old
+ new
@@ -81,8 +81,21 @@
next ObjectiveC if matches?(/@(end|implementation|protocol|property)\b/)
next ObjectiveC if contains?('@"')
next Matlab if matches?(/^\s*?%/)
end
+
+ disambiguate '*.php' do
+ # PHP always takes precedence over Hack
+ PHP
+ end
+
+ disambiguate '*.hh' do
+ next Cpp if matches?(/^\s*#include/)
+ next Hack if matches?(/^<\?hh/)
+ next Hack if matches?(/(\(|, ?)\$\$/)
+
+ Cpp
+ end
end
end
end