Require whitespace to terminate a URL
What should ZGL do if an URL ends with a
;? Here are two choices:
- Include the
;character as part of the URL.
- Treat the
;as a separate token.
As a point of comparison, many text-processing tools (e.g. email clients) do not include a trailing punctuation character in a URL.
However, if (2), how can a user represent a URL that ends in a
;? This would require additional grammar rules. Since I prefer ZGL's grammar to be simple, I choose (1).
Decision: Whitespace is required to terminate a URL.
For example, this would be incorrect:
/org/PBS homepage https://www.pbs.org;
Above, a parser would consume the
; as part of the URL. However, then it would not find a terminating
; and fail.
Here is the correct way to write the graph expression:
/org/PBS homepage https://www.pbs.org ;
- Simpler grammar.
- Simpler to implement.
- Slightly less convenient to type.
- Assymetry: there are no other places where whitespace is required before a terminating semicolon (
Status: Accepted on 2021-02-25.