You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When someone searches for terms in a comment, those terms could be highlighted with the mark tag in the comment text.
Mockup:
Comment text is stored in comments.comment as the user wrote, using markdown, and rendered to html in comments.markeddown_comment. This is so we don't incur that render cost on every view of a comment, but it means this feature will need to operate on the HTML rather than the markdown. (I suppose it's possible as part of adding Solid Cache in #1366 that we could move this functionality out of the database and into a fragment cache with a long expiry, say 365 days. Though we'd want to add significant testing that changes to our markdown code or commonmark don't lead to comment rendering changing meaningfully over time!)
A corner case: MariaDB's full-text indexes for search ignore punctuation, whether used as part of a sentence or as markdown. So you can search for a quoted phrase like "sometimes correctly" to find this same comment where it is rendered in HTML as correctly.</p></blockquote><p>Sometimes.
The text was updated successfully, but these errors were encountered:
When someone searches for terms in a comment, those terms could be highlighted with the mark tag in the comment text.
Mockup:
Comment text is stored in
comments.comment
as the user wrote, using markdown, and rendered to html incomments.markeddown_comment
. This is so we don't incur that render cost on every view of a comment, but it means this feature will need to operate on the HTML rather than the markdown. (I suppose it's possible as part of adding Solid Cache in #1366 that we could move this functionality out of the database and into a fragment cache with a long expiry, say 365 days. Though we'd want to add significant testing that changes to our markdown code or commonmark don't lead to comment rendering changing meaningfully over time!)A corner case: MariaDB's full-text indexes for search ignore punctuation, whether used as part of a sentence or as markdown. So you can search for a quoted phrase like
"sometimes correctly"
to find this same comment where it is rendered in HTML ascorrectly.</p></blockquote><p>Sometimes
.The text was updated successfully, but these errors were encountered: