Method: JsDuck::Format::HtmlStack#close

Defined in:
lib/jsduck/format/html_stack.rb

#close(s) ⇒ Object

Scans a closing tag in HTML using the passed in StringScanner.



28
29
30
31
32
33
34
# File 'lib/jsduck/format/html_stack.rb', line 28

def close(s)
  s.scan(/<\//)
  tag = s.scan(/\w+/)
  s.scan(/>/)

  pop_tags(tag).map {|t| "</#{t}>" }.join
end