riscv / docs-resources

https://lists.riscv.org/g/sig-documentation
Creative Commons Attribution 4.0 International
23 stars 14 forks source link

Improve Sail code formatting and syntax highlighting #33

Closed AlfredoRodrigues4 closed 2 months ago

AlfredoRodrigues4 commented 2 months ago

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. image 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.

wmat commented 2 months ago

I'm confused. Is this PR adding the asciidoctor-sail extension that Alasdair wrote directly to the docs-resources?

AlfredoRodrigues4 commented 2 months ago

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 https://github.com/riscv/riscv-isa-manual/pull/1608 and I already understood the final objective, gonna close this PR, thanks!