# Syntax highlighting

**URL:** <https://talk.observablehq.com/t/syntax-highlighting/10792>\
**Category:** Feedback\
**Created:** [September 3, 2026, 12:43pm UTC](https://talk.observablehq.com/t/syntax-highlighting/10792 "2026-09-03T12:43:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![neocarto](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/neocarto/32/6554_2.png) [@neocarto](https://talk.observablehq.com/u/neocarto)\
**Post date:** [September 3, 2026, 12:43pm UTC](https://talk.observablehq.com/t/syntax-highlighting/10792/1 "2026-09-03T12:43:12Z")

</div>

When I write code in a Markdown cell to display it without executing it, there used to be syntax highlighting in Notebook 1. This is no longer the case with Notebook 2.0.

Example:

`~~~js`  
`let viz = import("npm:geoviz")`  
`~~~`

Is there any other solution?

---

<div class="post-metadata">

**Author:** ![jwoLondon](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/jwolondon/32/259_2.png) [@jwoLondon](https://talk.observablehq.com/u/jwoLondon)\
**Post date:** [September 3, 2026, 12:53pm UTC](https://talk.observablehq.com/t/syntax-highlighting/10792/2 "2026-09-03T12:53:51Z")

</div>

> [@neocarto](#):
>
> `~~~js`  
> `let viz = import("npm:geoviz")`  
> `~~~`

It appears as coloured syntax for me both in 2.0 and 1.0.

 ![syntax](https://canada1.discourse-cdn.com/flex030/uploads/observablehq/original/2X/6/6535de357a094b6df47a3b8e9dcd687156423e59.png)

---

<div class="post-metadata">

**Author:** ![neocarto](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/neocarto/32/6554_2.png) [@neocarto](https://talk.observablehq.com/u/neocarto)\
**Post date:** [September 3, 2026, 1:10pm UTC](https://talk.observablehq.com/t/syntax-highlighting/10792/3 "2026-09-03T13:10:42Z")

</div>

Weird

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/observablehq/original/2X/d/dd1a79690b873b019c7ac076f9ca7411e893a307.png)

---

<div class="post-metadata">

**Author:** ![jwoLondon](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/jwolondon/32/259_2.png) [@jwoLondon](https://talk.observablehq.com/u/jwoLondon)\
**Post date:** [September 3, 2026, 1:24pm UTC](https://talk.observablehq.com/t/syntax-highlighting/10792/4 "2026-09-03T13:24:32Z")

</div>

I think I might know what it is.

If I change the standard library from 2026 to the old 2018 one (cube icon in top right), the syntax colouring goes. So keeping with the new standard lib should be the solution here.
