Improve Sail code formatting and syntax highlighting#33
Closed
AlfredoRodrigues4 wants to merge 1 commit intoriscv:mainfrom
Closed
Improve Sail code formatting and syntax highlighting#33AlfredoRodrigues4 wants to merge 1 commit intoriscv:mainfrom
AlfredoRodrigues4 wants to merge 1 commit intoriscv:mainfrom
Conversation
Collaborator
|
I'm confused. Is this PR adding the asciidoctor-sail extension that Alasdair wrote directly to the docs-resources? |
Author
|
I didn't know that you were currently working on the Alasdair repository, I saw it and thought it would be interesting to try to add it to the main manual in order to improve it and try to do something cool, I already talked to you in riscv/riscv-isa-manual#1608 and I already understood the final objective, gonna close this PR, thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Sail code in the RISC-V manuals suffers from poor readability and alignment issues. I discovered a repository (https://github.com/Alasdair/asciidoctor-sail) that offers a solution to enhance the presentation of Sail code by aligning it and highlighting keywords with colors. This approach significantly improves the clarity of the Sail code in the manual.

To implement this, it's necessary to add a folder to the RISC-V ISA manual repository with the Ruby files that will handle the formatting. While not all of these files may be useful immediately, for now in simple sail codes only highlighter.rb file is used, they could be valuable for future enhancements.
I noticed that @wmat has previously interacted with this repository, which raises the question of why this solution hasn't been added yet.
And this is how the sail code will look like in the manual.
To implement this improvement, it will be necessary to include these files in the "REQUIRES" section of the Makefile in the RISC-V ISA Manual.