Where should a period be placed when a sentence ends in a word that is meant to be copied exactly?
Contrived example: Let's say that my friend is house-sitting and I want to text them the password to my laptop. The password is
password123. There is no period in the password.
Which of these has better punctuation?
The password to my laptop is "password123."
This is confusing because the password does not in fact include a period. The reader could copy it down incorrectly.
The password to my laptop is "password123".
This is (according to any source I can find) incorrect punctuation.
Is it acceptable to make an exception here and use the latter punctuation, given the intended utility of the sentence?
At the end of the day I just restructured the sentence to avoid this problem, but I am still curious if there is an official answer to this.