Skip to content

Commit

Permalink
defined ZERO_OR_MORE_SPACING
Browse files Browse the repository at this point in the history
  • Loading branch information
sonots committed Nov 19, 2014
1 parent 90fdbd7 commit 24d9d22
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/fluent/config/basic_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def initialize(strscan)

LINE_END = /(?:[ \t]*(?:\#.*)?(?:\z|[\r\n]))+/
SPACING = /(?:[ \t\r\n]|\z|\#.*?(?:\z|[\r\n]))+/
ZERO_OR_MORE_SPACING = /(?:[ \t\r\n]|\z|\#.*?(?:\z|[\r\n]))*/
SPACING_WITHOUT_COMMENT = /(?:[ \t\r\n]|\z)+/

module ClassMethods
Expand Down
2 changes: 1 addition & 1 deletion lib/fluent/config/v1_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def parse_element(root_element, elem_name, attrs = {}, elems = [])
elsif skip(/\</)
e_name = scan(ELEMENT_NAME)
spacing
e_arg = scan_nonquoted_string(/(?:\s*\>)/)
e_arg = scan_nonquoted_string(/(?:#{ZERO_OR_MORE_SPACING}\>)/)
spacing
unless skip(/\>/)
parse_error! "expected '>'"
Expand Down

0 comments on commit 24d9d22

Please sign in to comment.