Improve Sail code formatting and syntax highlighting #33
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.