class Rouge::Lexers::Pdf
Public Class Methods
Source
# File lib/rouge/lexers/pdf.rb, line 31 def self.detect?(text) return true if /\A%(P|F)DF-\d\.\d/.match?(text) end
PDF and FDF files must start with “%PDF-x.y” or “%FDF-x.y” where x is the single digit major version and y is the single digit minor version. For simplicity as a syntax highlighter, assumes occurs at start of a line.