diff --git a/lib/oga/lexer.rl b/lib/oga/lexer.rl index a74ab94..1f4675d 100644 --- a/lib/oga/lexer.rl +++ b/lib/oga/lexer.rl @@ -269,6 +269,24 @@ module Oga }; *|; + element_closing_tag := |* + whitespace => { advance_column }; + + element_name => { + emit_text_buffer + add_token(:T_ELEM_CLOSE, nil) + + # Advance the column for the ' => { fret; }; + *|; + element := |* whitespace => { advance_column }; @@ -289,15 +307,8 @@ module Oga '=' (dquote @string_dquote | squote @string_squote); # Non self-closing elements. - ' { + fcall element_closing_tag; fret; };