lib/rouge/text_analyzer.rb in rouge-2.1.1 vs lib/rouge/text_analyzer.rb in rouge-2.2.0

- old
+ new

@@ -13,9 +13,10 @@ # Check if the given shebang is present. # # This normalizes things so that `text.shebang?('bash')` will detect # `#!/bash`, '#!/bin/bash', '#!/usr/bin/env bash', and '#!/bin/bash -x' def shebang?(match) + return false unless shebang match = /\b#{match}(\s|$)/ match === shebang end # Return the contents of the doctype tag if present, nil otherwise.