Skip to content

Commit

Permalink
Use json instead of json5 for syntax highlighting (#2017)
Browse files Browse the repository at this point in the history
* Use json instead of json5 for syntax highlighting

Chroma, the library used for syntax highlighting in Hugo, does not support JSON5 so those code blocks were not highlighted.
However it supports comments in JSON so they are highlighted correctly in the rendered spec.

Signed-off-by: Kévin Commaille <[email protected]>

* Add changelog

Signed-off-by: Kévin Commaille <[email protected]>

---------

Signed-off-by: Kévin Commaille <[email protected]>
  • Loading branch information
zecakeh authored Nov 28, 2024
1 parent f8119f5 commit f64eec5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions changelogs/client_server/newsfragments/2017.clarification
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use `json` instead of `json5` for syntax highlighting.
4 changes: 2 additions & 2 deletions content/client-server-api/modules/event_replacements.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ for re-notifying if the sending client feels a large enough revision was made).

For example, if there is an event mentioning Alice:

```json5
```json
{
"event_id": "$original_event",
"type": "m.room.message",
Expand All @@ -324,7 +324,7 @@ For example, if there is an event mentioning Alice:

And an edit to also mention Bob:

```json5
```json
{
"content": {
"body": "* Hello Alice & Bob!",
Expand Down
4 changes: 2 additions & 2 deletions content/client-server-api/modules/rich_replies.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ the `rel_type` and `event_id` properties of `m.relates_to` become *optional*.

An example reply would be:

```json5
```json
{
"content": {
"m.relates_to": {
Expand Down Expand Up @@ -187,7 +187,7 @@ of the replied to event and any users mentioned in that event. See

An example including mentioning the original sender and other users:

```json5
```json
{
"content": {
"m.relates_to": {
Expand Down

0 comments on commit f64eec5

Please sign in to comment.