Class: Erbside::SGML
Overview
Constant Summary
collapse
- EXTENSIONS =
%w{ .html .xml }
Constants inherited
from Inline
Inline::TAG
Instance Attribute Summary
Attributes inherited from Inline
#context, #file, #result, #type
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Inline
#changed?, #content, #exist?, extension_list, factory, #format_block, #format_side, inherited, #initialize, map, #output, register, #relative_output, #remarker_multiline, #render, #render_blocks, #render_result, #render_sides, #render_template, #save
Class Method Details
.extensions ⇒ Object
11
12
13
|
# File 'lib/erbside/inline/sgml.rb', line 11
def self.extensions
EXTENSIONS
end
|
Instance Method Details
#block_match ⇒ Object
37
38
39
40
41
|
# File 'lib/erbside/inline/sgml.rb', line 37
def block_match
b = Regexp.escape()
e = Regexp.escape()
%r{^(\s*)(#{b})(\s*)(:#{TAG})(\+\d*)?(\:)(\s*)((?m:.*?))(\s#{e})}
end
|
#block_parts(match_data) ⇒ Object
44
45
46
47
48
49
50
51
52
|
# File 'lib/erbside/inline/sgml.rb', line 44
def block_parts(match_data)
{ :indent => match_data[1],
:pad => match_data[3],
:count => match_data[5],
:space => match_data[7],
:template => match_data[8],
:tail => match_data[9]
}
end
|
#line_match ⇒ Object
31
32
33
34
|
# File 'lib/erbside/inline/sgml.rb', line 31
def line_match
rem = Regexp.escape()
/^(\ *)(.*?)(\ *)(#{rem})(\ *)(:#{TAG})()?(:)(.*?\S.*?)(-->)$/
end
|
16
17
18
|
# File 'lib/erbside/inline/sgml.rb', line 16
def
'<!--'
end
|
21
22
23
|
# File 'lib/erbside/inline/sgml.rb', line 21
def
'<!--'
end
|
26
27
28
|
# File 'lib/erbside/inline/sgml.rb', line 26
def
'-->'
end
|