Skip to content

consume_url does not record newlines #27

@haxney

Description

@haxney

In consume_url(), a newline character is consumed without calling
tokenizer.new_line(). This can be fixed by replacing the first match block
of consume_url() with

match tokenizer.current_char() {
    '\t' | ' ' => tokenizer.position += 1,
    '\n' => { tokenizer.position += 1;
                tokenizer.new_line(); },
    "\"" => return consume_quoted_url(tokenizer, false),
    '\'' => return consume_quoted_url(tokenizer, true),
    ')' => { tokenizer.position += 1; break },
    _ => return consume_unquoted_url(tokenizer),
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions