# Syntax highlighting, when copying-and-pasting to somewhere that supports coloured text, is not copied

**URL:** https://meta.discourse.org/t/syntax-highlighting-when-copying-and-pasting-to-somewhere-that-supports-coloured-text-is-not-copied/403639
**Category:** Feature
**Tags:** markdown
**Created:** [22 במאי,‏ 2026,‏ 4:06pm UTC](https://meta.discourse.org/t/syntax-highlighting-when-copying-and-pasting-to-somewhere-that-supports-coloured-text-is-not-copied/403639 "2026-05-22T16:06:29Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![roke\_julian\_lockhart](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/roke_julian_lockhart/32/540179_2.png) [@roke\_julian\_lockhart](https://meta.discourse.org/u/roke_julian_lockhart)
#### Post date: [22 במאי,‏ 2026,‏ 4:27pm UTC](https://meta.discourse.org/t/syntax-highlighting-when-copying-and-pasting-to-somewhere-that-supports-coloured-text-is-not-copied/403639/3 "2026-05-22T16:27:54Z")

</div>

> [@Lilly](#):
>
> Did you use `diff`?

@Lilly, yes. Specifying `diff` is required, for colourisation to render, on Discourse:

1. 

````plaintext
```
@@ -1,11 +1,11 @@
-Young volunteer award – celebrating young volunteers, aged 16-24, who go the extra mile in their local communities, demonstrating our values and the importance of connection and action.
+The Young Volunteer Award celebrates young volunteers, aged 16–24, who go the extra mile in their local communities, demonstrating our values and the importance of connection and action.
 
 Do you know a young person who:
 
-Has been volunteering with Neighbourhood Watch and making a positive impact in their community.
+• Has been volunteering with Neighbourhood Watch and making a positive impact in their community?
 
-Gives up their time to support their local community (foodbanks, community hubs and groups, homeless, faith groups)
+• Gives up their time to support their local community (foodbanks, community hubs and groups, homeless, faith groups)?
 
-Held fundraising activities with their school or college or have organised litter picks or other local events.
+• Held fundraising activities with their school or college or have organised litter picks or other local events?
 
-You think this young volunteer deserves to be recognised for their hard work and commitment to their community.
+If so, do you think this young volunteer deserves to be recognised for their hard work and commitment to their community?
```

````

2. 

> ```plaintext
> @@ -1,11 +1,11 @@
> -Young volunteer award – celebrating young volunteers, aged 16-24, who go the extra mile in their local communities, demonstrating our values and the importance of connection and action.
> +The Young Volunteer Award celebrates young volunteers, aged 16–24, who go the extra mile in their local communities, demonstrating our values and the importance of connection and action.
>  
> Do you know a young person who:
>  
> -Has been volunteering with Neighbourhood Watch and making a positive impact in their community.
> +• Has been volunteering with Neighbourhood Watch and making a positive impact in their community?
>  
> -Gives up their time to support their local community (foodbanks, community hubs and groups, homeless, faith groups)
> +• Gives up their time to support their local community (foodbanks, community hubs and groups, homeless, faith groups)?
>  
> -Held fundraising activities with their school or college or have organised litter picks or other local events.
> +• Held fundraising activities with their school or college or have organised litter picks or other local events?
>  
> -You think this young volunteer deserves to be recognised for their hard work and commitment to their community.
> +If so, do you think this young volunteer deserves to be recognised for their hard work and commitment to their community?
> 
> ```

Are you referring to me authoring CommonMark _in my client_?

[https://superuser.com/q/1361551/904401](https://superuser.com/q/1361551/904401)

If so, that would be the purview for elsewhere:

> ****
>
> > **[Fenced code blocks should add class to \`code\` rather than \`pre\`, matching the...](https://talk.commonmark.org/t/fenced-code-blocks-should-add-class-to-code-rather-than-pre-matching-the-html-best-practice/136/8?u=rokejulianlockhart)**
> >
> > @mathias, isn’t the best practice to utilise both, like ? The WHATWG’s HTML5 LS and IETF’s BCP 47 appear to recommend this (with type="text/x.javaScript" also appended, in scripts).

Instead, I am referring to copying directly from rendered markup here, like:

> [@When copying content from a published post or preview, don't copy links to embedded images; copy the images](https://meta.discourse.org/t/when-copying-content-from-a-published-post-or-preview-dont-copy-links-to-embedded-images-copy-the-images/388327):
>
> Recently, I wanted to duplicate the content of a Discourse post into a message, to be sent via e-mail. That worked well. However, that post has since been deleted, so the images have been removed from the server: [[1]](#footnote-1888986-1)[[2]](#footnote-1888986-2) Instead, having the images themselves duplicated into the clipboard (perhaps, via a src="data:image/png;base64, rather than an src="https:), would be an improvement. This more prominently applies to content copied from the previewer. [[3]](#footnote-1888986-3)[gitlab.com/-/snippets/490…](https://gitlab.com/-/snippets/4904110)

---

_[View the full topic](https://meta.discourse.org/t/syntax-highlighting-when-copying-and-pasting-to-somewhere-that-supports-coloured-text-is-not-copied/403639)._
