Skip to content

@author tag is too strict #41804

@sandersn

Description

@sandersn

Currently the author tag has a special parser explicitly to allow @ in the middle of email addresses. Otherwise the @ is parsed as the beginning of a new tag. But it doesn't otherwise parse -- it just dumps everything into a string just like the default tag parsing code. Despite this, it has a lot of restrictions that, if violated, prevent the tag from parsing at all. This doesn't make sense; if somebody is trying to quote @, they shouldn't have to get the format just right

  1. Should allow arbitrary text for the author, except for @. If your name is, say, @108, the current code mistakenly skips the number literal.
  2. Should allow arbitrary text for the address, including any number of @.
  3. Shouldn't require a matching > for <. tryParse isn't going to fail
  4. Should [probably] allow splitting author/address across newlines.

I suspect that the code wouldn't need lookahead if the rules were simplified in the above way. Even if the parser needed to produce author and email properties, they could still be arbitrary text -- there's no point in half-baking another address verifier.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions