Skip to content

Accepts (and prints) invalid additional rules in strict mode #81

@westnordost

Description

@westnordost

According to the specification https://wiki.openstreetmap.org/wiki/Key:opening_hours/specification#explain:additional_rule_separator , the additional rule separator may only follow after either of a time selector, a rule modifier or a comment.

For example Mo-Th, Jun-Jul Fr is parsed without error in strict mode. It is also printed the same.

The opening hours evaluation tool is unable to deal with this (not even with the lenient parsing it does by default)

There are several avenues how to deal with this:

  1. allow this syntax only in non-strict mode

  2. if such rules are encountered, append open to the rule that would otherwise cause the following rule to be invalid when pretty-printing it , e.g. Mo-Th, Jun-Jul Fr -> Mo-Th open, Jun-Jul Fr

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions