Class Rouge::TextAnalyzer
In: lib/rouge/text_analyzer.rb
Parent: String

Methods

Public Instance methods

Return the contents of the doctype tag if present, nil otherwise.

Check if the doctype matches a given regexp or string

Return true if the result of lexing with the given lexer contains no error tokens.

Find a shebang. Returns nil if no shebang is present.

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‘

[Validate]