-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only support tags at the beginning of a line #4
Comments
+1. In |
- Words can begin with minus signs, for example negative numbers and program options. Minus signs at the beginning of the line that are not followed by spaces are therefore treated as part of words (if the next character is a word character). Minus signs elsewhere were already treated as word tokens. This also allows the janky en- and em-dashes "--" and "---" to be parsed as words at the beginning of the line. - Plus signs are treated the same way for consistency, although they have none of the above uses. - @ characters are now allowed inside words, permitting unescaped email addresses. @ characters cannot start words, because this conflicts with tag markup. Apart from existing tags, allowing @ at the start of words would make it difficult to add new tags later. Related ocaml-doc/octavius#4.
odoc's parser now still treats ((output
(ok
(((f.ml (1 0) (1 11))
(paragraph (((f.ml (1 0) (1 11)) (word [email protected]))))))))
(warnings ())) I suggest to keep forbidding leading @ in the middle of lines for several reasons:
|
- Words can begin with minus signs, for example negative numbers and program options. Minus signs at the beginning of the line that are not followed by spaces are therefore treated as part of words (if the next character is a word character). Minus signs elsewhere were already treated as word tokens. This also allows the janky en- and em-dashes "--" and "---" to be parsed as words at the beginning of the line. - Plus signs are treated the same way for consistency, although they have none of the above uses. - @ characters are now allowed inside words, permitting unescaped email addresses. @ characters cannot start words, because this conflicts with tag markup. Apart from existing tags, allowing @ at the start of words would make it difficult to add new tags later. Related ocaml-doc/octavius#4.
- Words can begin with minus signs, for example negative numbers and program options. Minus signs at the beginning of the line that are not followed by spaces are therefore treated as part of words (if the next character is a word character). Minus signs elsewhere were already treated as word tokens. This also allows the janky en- and em-dashes "--" and "---" to be parsed as words at the beginning of the line. - Plus signs are treated the same way for consistency, although they have none of the above uses. - @ characters are now allowed inside words, permitting unescaped email addresses. @ characters cannot start words, because this conflicts with tag markup. Apart from existing tags, allowing @ at the start of words would make it difficult to add new tags later. Related ocaml-doc/octavius#4.
Whilst I think ocamldoc allows tags to start anywhere in a comment, this is extremely annoying since it means email addresses must be escaped. It also doesn't seem to actually be used anywhere, so we should just get rid of it.
The text was updated successfully, but these errors were encountered: