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

Circulars: Convert emails to hyperlinks #2456

Open
4 tasks
tylerbarna opened this issue Jul 16, 2024 · 6 comments
Open
4 tasks

Circulars: Convert emails to hyperlinks #2456

tylerbarna opened this issue Jul 16, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@tylerbarna
Copy link
Member

Description

We currently have functionality that automatically inserts hyperlinks for URLs, DOIs, TNSs, and GCN Circulars when they're referenced in Circulars. It may be beneficial to automatically hyperlink email addresses, both in the body of Circulars and in the submitter information.

The submitter email will be a more straightforward regular expression, as it can simply be a regular expression that matches any string enclosed by <>, but the regular expression to link to emails in a Circular may be less straightforward.

Acceptance criteria

  • Implement a regular expression (or regular expressions) that match any strings that contain an email [email protected] and convert them to a hyperlink in the format mailto:[email protected]
  • Ensure arbitrary strings that contain the @ symbol are not matched by the regular expression
  • Apply this regular expression to both the submitter email and any potential emails in the body of Circulars
  • The function that evaluates the regular expression should be able to handle instances where the submitter does not contain an email without raising an error
@tylerbarna tylerbarna added the enhancement New feature or request label Jul 16, 2024
@lpsinger
Copy link
Member

It already works for Markdown-formatted Circulars because this is done by the autolink literals plugin.

@lpsinger
Copy link
Member

@tylerbarna
Copy link
Member Author

It already works for Markdown-formatted Circulars because this is done by the autolink literals plugin.

does this include the submitter email in the header?

@lpsinger
Copy link
Member

It already works for Markdown-formatted Circulars because this is done by the autolink literals plugin.

does this include the submitter email in the header?

No, but you could easily process that using remark/rehype.

@tylerbarna
Copy link
Member Author

@lpsinger that's what I was thinking, should this issue be migrated to remark-rehype-astro?

@lpsinger
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants