Sometimes the "@user.sitename.tld" shortcuts don’t work as expected.
The bugs are slightly different with plain text/HTML vs Markdown. Markdown-coded posts are tagged.
I've tested the issue with all 61 versions of the shortcuts listed here:
https://www.dreamwidth.org/support/faqbrowse?faqid=87
For simplicity's sake, in this comm I demonstrated the bugs with the four variants of the AO3:
\@user.archiveofourown.org
\@user.archiveofourown
\@user.ao3.org
\@user.ao3
There are four bugs:
ETA: 8 May 2020. This one seems to be fixed!
1. Markdown: When the shortcut is bracketed by backticks for `code` format, the display explodes shortcuts into raw HTML code
2. HTML and Markdown: periods disappear when they directly follow @user.sitename.tld or @user.sitename
(2a. Markdown: workaround! with @user.sitename.tld\. or @user.sitename\. the backslash escape permits the period to display as it should)
3. HTML and Markdown: Shortcut never expands before period for @user.site or @user.abbrev
4. Markdown at the phrase level -- bold, italic -- suppresses shortcut expansion, displaying @user.sitename.tld or its variants
Overview of what's here
Sticky: Sep. 10th, 2019 03:21 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
YouTube has changed its usernames to include the @-sign
DW correctly displays the YT user head when I type
But that doesn’t link to her channel, which is
https://www.youtube.com/@ElleCordova
To get around this, make the userhead version the anchor to the YT link
or
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
State of bugs, June 4
Jun. 4th, 2020 09:58 am![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
OK, so after perusing the examples throughout the community alongside their source text, here's what I'm seeing:
- Most of the bugs are fixed.
- The remaining bugs can be summed up as "user mentions before a sentence-ending period usually go bad."
Yeah? (edit: found the problem, PR here.)
That fits with the behavior changes I made recently, which went live in the (april? may?) code push. The current intended behavior for @mentions
is:
Enabled for both HTML and Markdown.
NOT enabled when "don't autoformat" is set.
TEMPORARILY DISABLED within the following elements (both Markdown and HTML variants):
- Code spans (
<code>
or backticks) - Preformatted blocks (
<pre>
; this also catches Markdown indented code blocks, which render to html as<pre><code>...</code></pre>
) <textarea>
s<raw-code>
- embedded tweets (
<blockquotes>
that have a special class. kind of a weird exception.)
Errata
- The "bold" examples below don't look like they're working, but that's just because user tag text is already styled with a bold font weight. If you inspect the HTML, you'll see they're properly wrapped in a
<strong>
element. - I didn't see any examples of this one yet, but user tags used to act weird inside links, in a variety of ways. Now, we should be using a non-linked variant of the user tag, so it looks right but doesn't break the link:
- markdown with @: some
roadrunnertwice link
- html with @: some
roadrunnertwice link
- html with usertag: some
roadrunnertwice link
- markdown with @: some
updated bug 2, HTML version
May. 7th, 2020 04:36 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
If
@username.sitename
appears at the end of a sentence, like > input:
The best bug hunter is @punk.ao3.
Dreamwidth throws error message [ bad username or site: punk @ AO3. ] which includes the final period. Like this:
> The best bug hunter is
Possible workarounds for HTML:
- precede the period with a zero-width-space character ref: the best bug hunter is
- replace the period with the period character ref: the best bug hunter is
- give up and use the old HTML format: <user name=runpunkrun>
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Pre-push workaround was to add backslash before period, which no longer works
> the period is escaped by a backslash: the best bug hunter is
****
When the full TLD is included, user head displays correctly BUT it still swallows the period. Other punctuation is no problem.
The best bug hunter ispunk.
Also known as actuallypunk.
That would berunpunkrun.
Used to berunpunkrun.
Why do you readjesse_the_k? Never read
jesse_the_k's terrible. She never tweets at
jesse_the_k!
Updates to bug 2 after Apr 2020 code push
May. 7th, 2020 04:19 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
The @ shortcut explodes when a period follows the username.sitename
If @username.sitename
appears at the end of a sentence, like
input: The best bug hunter is
@
punk.ao3.
Dreamwidth fails to expand, showing the error message [ bad username or site: punk @ AO3 ]
and swallowing the period. Like this:
unescaped text, throws error that includes the period: The best bug hunter is
punk.
(I formatted the input sample by surrounding the at-sign with backticks.)
Current workaround:
only the period is escaped inside backticks: the best bug hunter is
punk
.
Prepush workaround was to add backslash before period, which no longer works
the period is escaped by a backslash: the best bug hunter is
punk.
When the full TLD is included, user head displays correctly BUT it still swallows the period.
The best bug hunter is
punk.
Also known as actually
punk.
That would be
runpunkrun.
Used to be
runpunkrun.
Other contacting punctuation doesn't trigger the bug
Why do you read
jesse_the_k? Never read
jesse_the_k's terrible. She never tweets at
jesse_the_k!
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
As of 8 May 2020, this bug seems to be fixed! HOORAY
markdown CODE format explodes shortcuts into visible HTML code
code follows @user.archiveofourown.org
@user.archiveofourown.org
end of code
code @user.archiveofourown.org
@user.archiveofourown.org code
code @user.archiveofourown.org
@user.archiveofourown.org code
Code block
@user.archiveofourown.org block
block @user.archiveofourown.org
@user.archiveofourown.org block
block @user.archiveofourown.org
Code inside structure
- code follows
@user.archiveofourown.org
@user.archiveofourown.org
end of code- code follows
@user.archiveofourown.org
@user.archiveofourown.org
end of code
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Periods that follow
user or [Bad username or site: user @ sitename] disappear
In two cases a following period disappears
- fully qualified with user.sitename.tld
- when tld is assumed user.sitename
user.sitename.tld
- period
user.
- backslash period
user.
- paren (
user)
- hyphen -[Bad username or site: user @ archiveofourown.org-]
- bang
user!
- question
user?
- slash period
user/.
- backslash period
user.
user.abbrev.tld
- period
user.
- backslash period
user.
- paren (
user)
- hyphen -[Bad username or site: user @ ao3.org-]
- bang
user!
- question
user?
- slash period
user/.
- backslash period
user.
Only in Markdown, backslash before period escapes the error
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Shortcut doesn’t expand for user.site or user.abbrev
In two cases the period appears BUT the shortcut prints in body font instead of expanding
- abbreviation with tld user.abbrev.tld
- just abbreviation user.abbrev
ESCAPING THE PERIOD WITH BACKSLASH makes it print ONLY IN MARKDOWN not in text/html
( live samples )
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Phrase-level format displays but shortcut doesn't expand
italic user
user italic
bold user
user bold
Structural Markdown format works
user h4
h4
user
Bullets
Numbers
Blockquote
user quote
quote
user
user quote
quote
user
Format Fails Even within Structure
Four h4s follow: