Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Codidact Meta!

Codidact Meta is the meta-discussion site for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.

Comments on Double brackets in footnotes

Post

Double brackets in footnotes

+1
−0

While typing the initial draft of a post, or editing an existing post, footnotes appear in the preview in superscript in square brackets, like this:

Footnote with single square brackets during editing

However, after saving the post, the footnotes appear in superscript in double square brackets, like this:

Footnote with double square brackets after saving

Am I correct in assuming that the double square brackets are unintentional, and that the appearance in the preview during editing is the desired format?

Examples


(Note that the functionality is working fine - clicking on the superscript footnote label takes you to the footnote, and clicking on the return link at the end of the footnote takes you back to where you were reading - in both preview and saved post.)


  1. A footnote as an example (this showed above with single square brackets in the edit preview) ↩︎

History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

regression? (8 comments)
regression?
Monica Cellio‭ wrote over 1 year ago

That looks like a regression. I'm pretty sure that footnotes used to display properly in single brackets in posts. The editor preview is sometimes different (something about the client-side markdown library versus the final rendering, I think). Does anybody else remember footnotes having single brackets sometime in the past?

trichoplax‭ wrote over 1 year ago

I can't remember noticing footnotes either way in the past, so I don't know. The post where I noticed it was one I posted recently on Scientific Speculation. I'd be surprised if a regression/bug could affect only one site but mentioning just in case. I'll also link to the specific post as I realise I'm making the assumption that it affects all posts - I haven't looked for other examples.

Monica Cellio‭ wrote over 1 year ago

I think it's a safe bet that if it affects any post it affects all of them; this is rendering code, nothing community-specific about it. I just don't remember them looking like this in the past, and now I can't remember when (or if) that was the case.

trichoplax‭ wrote over 1 year ago

I've just been looking through some posts on Writing for an example, and the only one I found was a fake footnote using <sup> for superscript. No examples of a markdown footnote. I'm sure I've seen one at some point but I can't think which community it was on.

I can't say with certainty that it was only single brackets when I saw it in the past, but the double brackets surprised me, which suggests it might be the first time I'd seen it.

trichoplax‭ wrote over 1 year ago

In case it's useful in investigating this, I've happened upon a post with a footnote that correctly has just single square brackets.

I notice that it was posted 2 years ago, and has never been edited, in case either of those things are relevant. My guess would be that the age of the post is more relevant than it being unedited, as the example I gave in the question had the problem before any edits.

trichoplax‭ wrote over 1 year ago

I realised that when I posted this Meta question I neglected to link to the example where I first saw the double brackets, so I have now edited to included that answer and the one I found today as examples.

trichoplax‭ wrote over 1 year ago

The third example I linked to from the question was edited by Moshi shortly after, and now shows the double square brackets whereas it did not previously.

Suggests this may be related to the date and time that the post was saved, and may be stored incorrectly in the database rather than being a rendering bug.

Still shows correctly with single square brackets in the edit preview though, so it's probably not quite as simple as I'm suggesting.

Is the resulting HTML also stored in the database, in addition to the raw markdown? I'm struggling to think how else the rendered posts would only be incorrect for some save dates, and not others. If that's the case, then I guess that narrows the bug down to the code that produces the HTML to save in the database at the point a post is saved. I haven't looked at the code though, so these are just my rambling thoughts.

Monica Cellio‭ wrote over 1 year ago

trichoplax‭ I think you're on to something. The database schema says that the posts table has columns for both "body" and "body_markdown". I'm guessing that we save the HTML to speed up rendering, but I'm not sure. If so, it would make sense that the HTML gets re-saved on any edit, and that would be why we see the time-based inconsistencies.