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

templates: add .email_domain() method to Signatures #4687

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Oct 22, 2024

  1. templates: add .email_domain() method to signatures

    This is slightly less pretty than making an Email type,
    but I think is much easier.
    
    I would use instead of the last argument of:
    
    ```
      concat(
        label("email", signature.username()),
        "@",
        label("email",
          signature.email().remove_prefix(
            signature.username()
          ).remove_prefix("@")
        )
      )
    ```
    
    (Aside for more motivation: I initially had a bug above by using
    `.remove_prefix(signature.username() ++ "@")`. This is wrong since an
    email might not contain an `@`, as I discovered while looking at the
    code. The bug is now fixed, but `signature.email_domain()` would avoid
    the problem)
    ilyagr committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    448f1fd View commit details
    Browse the repository at this point in the history