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

Use monaco-mermaid for syntax highlighting and many syntax highlighting improvements #2449

Merged
merged 9 commits into from
Nov 11, 2021
Merged

Conversation

Yash-Singh1
Copy link
Member

@Yash-Singh1 Yash-Singh1 commented Oct 31, 2021

📑 Summary

This changes the syntax highlighting of the documentation:

  • Use monaco-mermaid to highlight code snippets that is Mermaid code
  • Add mermaid-example to remove redundant code snippet and diagram scenarios.
  • Many other code fences with syntax highlighting (added while I was going through the documentation)
  • Added code in places where an example was provided and the diagram rendered was only shown

Related to mermaid-js/mermaid-live-editor#404

📏 Design Decisions

Describe the way your implementation works or what design decisions you made if applicable.

  • Imports monaco-editor and monaco-mermaid
  • Adds plain elements to docs
  • Asynchronously colorized elements

📋 Tasks

Make sure you

  • 📖 have read the contribution guidelines
  • 💻 have added unit/e2e tests (if appropriate)
  • 🔖 targeted develop branch

docs/8.6.0_docs.md Outdated Show resolved Hide resolved
@sidharthv96
Copy link
Member

The highlighting works perfectly when a page is loaded for me, but when I navigate to another page using the navbar, highlighting isn't done.

Screen.Recording.2021-11-01.at.11.54.34.PM.mov

@sidharthv96
Copy link
Member

The next step you mentioned for removing duplicate is a very welcome addition. As there were issues reported in live editor citing lack of example and it'll free up the maintainers from having to keep the copies in sync.

Ref: #2394 (comment)

@Yash-Singh1 Yash-Singh1 mentioned this pull request Nov 2, 2021
43 tasks
@Yash-Singh1
Copy link
Member Author

The next step you mentioned for removing duplicate is a very welcome addition. As there were issues reported in live editor citing lack of example and it'll free up the maintainers from having to keep the copies in sync.

Ref: #2394 (comment)

Sure I will include that in this PR.

The highlighting works perfectly when a page is loaded for me, but when I navigate to another page using the navbar, highlighting isn't done.

I will look into this.

@Yash-Singh1 Yash-Singh1 marked this pull request as draft November 2, 2021 01:00
@Yash-Singh1 Yash-Singh1 marked this pull request as ready for review November 2, 2021 02:51
@Yash-Singh1 Yash-Singh1 marked this pull request as draft November 2, 2021 02:51
@Yash-Singh1 Yash-Singh1 marked this pull request as ready for review November 2, 2021 03:18
@knsv
Copy link
Collaborator

knsv commented Nov 3, 2021

@Yash-Singh1 This looks very promising!

docs/index.html Outdated Show resolved Hide resolved
@knsv knsv merged commit 857f6c8 into mermaid-js:develop Nov 11, 2021
@jvaque jvaque mentioned this pull request Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants