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
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 ...
#3: Post edited
- 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
- 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
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.