Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#1958] Use syntax coloring for code blocks in docs #2099

Merged

Conversation

asdfghjkxd
Copy link
Contributor

Fixes #1958

Proposed commit message

Current code blocks do not use the built-in syntax highlighting
feature offered by Markbind/Markdown.

This impedes the readability of the code within the code blocks.

Let's update the code blocks in the documentation to enable
syntax highlighting to further enhance readability of the documentation
and the code.

Other information

N/A

@asdfghjkxd asdfghjkxd requested a review from a team January 29, 2024 07:57
@asdfghjkxd asdfghjkxd marked this pull request as ready for review January 29, 2024 07:57
Copy link
Contributor

@jonasongg jonasongg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jonasongg jonasongg requested a review from a team January 29, 2024 09:26
Copy link
Member

@MarcusTXK MarcusTXK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job locating where the code blocks are used in the documentation. Just some minor nitpicks to address before this is merged.

```
Not okay (Only mentions zoneId parameter):
```java
//Not okay (Only mentions zoneId parameter):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//Not okay (Only mentions zoneId parameter):
// Not okay (Only mentions zoneId parameter):

Would be good to add a space here after the comment, and update the other // for consistency as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh oops, I must have forgotten to add the space after changing all the code blocks. It should be fixed in the new commit!

.active-text {
color: mui-color('green');
}
```

In `c-summary-charts.vue`, locate `summary-chart__title--name`, and add the following to its `v-bind:class` attribute map.

```
```vue
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe MarkBind supports the vue code block, perhaps we could either use another code block syntax highlighting, or remove it altogether.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, I have removed the vue tag from the code, it should look better now!

Copy link
Member

@MarcusTXK MarcusTXK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MarcusTXK MarcusTXK requested a review from a team January 29, 2024 10:13
Copy link
Contributor

@vvidday vvidday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Looks like Markbind uses highlight.js for syntax highlighting, and it doesn't seem to support Vue.

Also since we are using Pug + Vue, it probably won't be straightforward to configure syntax highlighting for our Vue files. I think we can just leave those blocks as is.

@ckcherry23 ckcherry23 merged commit 7977382 into reposense:master Jan 31, 2024
10 checks passed
Copy link
Contributor

The following links are for previewing this pull request:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use syntax coloring for code blocks in docs
5 participants