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 »
Meta

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Post History

75%
+4 −0
Meta Code block in comments is highlighted only when viewed in the thread's link

Code blocks inside comments are hightlighted only if I'm on the comment's thread page. If I view it on the post itself (after expanding the respective thread), it's not highlighted. Example: in ...

0 answers  ·  posted 3y ago by hkotsubo‭  ·  edited 2y ago by Monica Cellio‭

#4: Post edited by user avatar Monica Cellio‭ · 2022-11-25T03:21:58Z (about 2 years ago)
#3: Post edited by user avatar hkotsubo‭ · 2021-11-19T14:22:42Z (about 3 years ago)
  • Code blocks inside comments are hightlighted only if I'm on the comment's thread page. If I view it on the post itself (after expanding the respective thread), it's not highlighted.
  • ---
  • Example: in [this post](https://software.codidact.com/posts/284910/284911#answer-284911) I clicked on the comment thread to expand it, and the code block is not highlighted:
  • ![code block not highlighted](https://software.codidact.com/uploads/bzyd5arzzdQs7QKPnBAofX4h)
  • ---
  • But if I access the [thread link](https://software.codidact.com/comments/thread/4992), the code block is highlighted:
  • ![code block highlighted](https://software.codidact.com/uploads/H4ZRMRaXr7U2jrD3LyAjnFfy)
  • ---
  • The code block is correctly set with the language hint (it starts with <code>```python</code>), so I guess it should be highlighted in all cases.
  • Tested in Chrome 95.0.4638.54/Ubuntu 20, and Chrome 95.0.4638.50/iOS 15.0.2.
  • Code blocks inside comments are hightlighted only if I'm on the comment's thread page. If I view it on the post itself (after expanding the respective thread), it's not highlighted.
  • ---
  • Example: in [this post](https://software.codidact.com/posts/284910/284911#answer-284911) I clicked on the comment thread to expand it, and the code block is not highlighted:
  • ![code block not highlighted](https://software.codidact.com/uploads/bzyd5arzzdQs7QKPnBAofX4h)
  • ---
  • But if I access the [thread link](https://software.codidact.com/comments/thread/4992), the code block is highlighted:
  • ![code block highlighted](https://software.codidact.com/uploads/H4ZRMRaXr7U2jrD3LyAjnFfy)
  • ---
  • The code block is correctly set with the language hint (it starts with <code>```python</code>), so I guess it should be highlighted in all cases.
  • Tested in:
  • - Ubuntu 20: Chrome 95.0.4638.54 and Firefox 94.0
  • - iOS 15.0.2: Chrome 95.0.4638.50 and Safari
#2: Post edited by user avatar hkotsubo‭ · 2021-11-19T14:18:25Z (about 3 years ago)
  • Code blocks inside comments are hightlighted only if I'm on the comment's thread page. If I view it on the post itself (after expanding the respective thread), it's not highlighted.
  • ---
  • Example: in [this post](https://software.codidact.com/posts/284910/284911#answer-284911) I clicked on the comment thread to expand it, and the code block is not highlighted:
  • ![code block not highlighted](https://software.codidact.com/uploads/bzyd5arzzdQs7QKPnBAofX4h)
  • ---
  • But if I access the [thread link](https://software.codidact.com/comments/thread/4992), the code block is highlighted:
  • ![code block highlighted](https://software.codidact.com/uploads/H4ZRMRaXr7U2jrD3LyAjnFfy)
  • ---
  • The code block is correctly set with the language hint (it starts with <code>```python</code>), so I guess it should be highlighted in all cases.
  • Code blocks inside comments are hightlighted only if I'm on the comment's thread page. If I view it on the post itself (after expanding the respective thread), it's not highlighted.
  • ---
  • Example: in [this post](https://software.codidact.com/posts/284910/284911#answer-284911) I clicked on the comment thread to expand it, and the code block is not highlighted:
  • ![code block not highlighted](https://software.codidact.com/uploads/bzyd5arzzdQs7QKPnBAofX4h)
  • ---
  • But if I access the [thread link](https://software.codidact.com/comments/thread/4992), the code block is highlighted:
  • ![code block highlighted](https://software.codidact.com/uploads/H4ZRMRaXr7U2jrD3LyAjnFfy)
  • ---
  • The code block is correctly set with the language hint (it starts with <code>```python</code>), so I guess it should be highlighted in all cases.
  • Tested in Chrome 95.0.4638.54/Ubuntu 20, and Chrome 95.0.4638.50/iOS 15.0.2.
#1: Initial revision by user avatar hkotsubo‭ · 2021-11-19T14:15:13Z (about 3 years ago)
Code block in comments is highlighted only when viewed in the thread's link
Code blocks inside comments are hightlighted only if I'm on the comment's thread page. If I view it on the post itself (after expanding the respective thread), it's not highlighted.

---
Example: in [this post](https://software.codidact.com/posts/284910/284911#answer-284911) I clicked on the comment thread to expand it, and the code block is not highlighted:

![code block not highlighted](https://software.codidact.com/uploads/bzyd5arzzdQs7QKPnBAofX4h)

---
But if I access the [thread link](https://software.codidact.com/comments/thread/4992), the code block is highlighted:

![code block highlighted](https://software.codidact.com/uploads/H4ZRMRaXr7U2jrD3LyAjnFfy)

---
The code block is correctly set with the language hint (it starts with <code>```python</code>), so I guess it should be highlighted in all cases.