Skip to content
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

handle explicit author attributes #10

Open
jaredh159 opened this issue May 18, 2024 · 0 comments
Open

handle explicit author attributes #10

jaredh159 opened this issue May 18, 2024 · 0 comments

Comments

@jaredh159
Copy link
Owner

jaredh159 commented May 18, 2024

see snippet below. when the parser encounters a document attribute trying to set author and/or email, we need to special case so that we can produce/parse an Author struct. these explicit attrs (as opposed to using the Author line) are documented to be only supported in the document header, so we can contain the logic there.

note in the snippet below how author_1 value shows up as John M Doe -- which sort of proves this exact example is really an error (maybe should produce a warning?) but at the very least explicitly setting via attrs (not combined with an author line) is a supported mechanism and needs to work.

see https://docs.asciidoctor.org/asciidoc/latest/attributes/document-attributes-ref/#document-metadata-attributes

= Doc Title
john M Doe <john@doe.com>; Bob Smith <bob@smith.org>
:author: Sally McAttr
:email: [email protected]


author={author}

author_1={author_1}

authors={authors}

email={email}

initials={authorinitials}

[subs=-macros]
email={email}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant