Class: FontWarning

Inherits:
TexWarning show all
Defined in:
lib/trex.rb

Instance Attribute Summary

Attributes inherited from TexWarning

#filestate, #limit

Instance Method Summary collapse

Methods inherited from TexWarning

#add_error, #empty?, #expand_input, #extract_line, #format_error, #handle, #has_error?, #render_line, #size, #sort, #to_s

Constructor Details

#initialize(limits = 10) ⇒ FontWarning

Returns a new instance of FontWarning.



805
806
807
# File 'lib/trex.rb', line 805

def initialize(limits=10)
    super('Font Shape Warnings', /Font Warning: Font shape /, /.*/, limits, 1)
end

Instance Method Details

#format_warning_message(line, message) ⇒ Object



808
809
810
811
812
813
# File 'lib/trex.rb', line 808

def format_warning_message(line, message)
    message.sub(/\(Font\)\s+/, '').
        sub("\n", ', ').
        sub(", Font shape", ',').
        match(/Font shape (.*?) on input/)[1]
end