You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@pml-lang, I've managed to update the PML syntax for Rouge to PML v2.1.0 — i.e. only those elements that were implemented using deprecated syntax from v1.5.0.
But I've also added a new cool feature for showing contents inside the [b and [i nodes styled as strong and emphasis, respectively. This is fairly easy to achieve in Rouge, since it's pure Ruby code and I could use some variables to track the nesting level of each node, in order to properly resume to the parent style when a nested [b or [i node ends. Unfortunately Rouge doesn't cover styling text which is both strong and emphasis, so when this occurs I chose to give precedence to italic style.
I've also automated the whole Rouge toolchain using Rake (Ruby's Make), which really simplifies development work (so much better than Make). I'm planning to use Rake for the whole repository, so I'll be replacing all the various build.sh and build.bat scripts with Rake tasks, leveraging the power of Ruby to automate creating tasks and tracking their dependencies procedurally, based on folders' contents and custom rules.
I'm not sure how long it will take to complete the Rouge lexer for PML, but hopefully it won't be too long. Then we'll have a nice syntax highlighter that can be used with PML documents. Rouge is natively supported by Asciidoctor in the HTML5 backend, and also by asciidoctor-pdf.
It would be nice if the PML converter will also support the Rouge highlighter, especially once we the PML lexer is complete.
P.S. — The JSON file auto-generated by pmlc has been really helpful in the Rouge work, especially when there have been PML updates. Although I didn't resort to using a Mustache template to auto-update the Rouge lexer directly, I've been using Mustache in this repository to generate a plain-text list of all the PML node tags, which I then paste into the Rouge syntax:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
@pml-lang, I've managed to update the PML syntax for Rouge to PML v2.1.0 — i.e. only those elements that were implemented using deprecated syntax from v1.5.0.
But I've also added a new cool feature for showing contents inside the
[b
and[i
nodes styled as strong and emphasis, respectively. This is fairly easy to achieve in Rouge, since it's pure Ruby code and I could use some variables to track the nesting level of each node, in order to properly resume to the parent style when a nested[b
or[i
node ends. Unfortunately Rouge doesn't cover styling text which is both strong and emphasis, so when this occurs I chose to give precedence to italic style.syntax-hl/rouge/
:pml-syntax.html
— Live Preview link!asciidoctor-example.html
— Live Preview link!I've also automated the whole Rouge toolchain using Rake (Ruby's Make), which really simplifies development work (so much better than Make). I'm planning to use Rake for the whole repository, so I'll be replacing all the various
build.sh
andbuild.bat
scripts with Rake tasks, leveraging the power of Ruby to automate creating tasks and tracking their dependencies procedurally, based on folders' contents and custom rules.I'm not sure how long it will take to complete the Rouge lexer for PML, but hopefully it won't be too long. Then we'll have a nice syntax highlighter that can be used with PML documents. Rouge is natively supported by Asciidoctor in the HTML5 backend, and also by asciidoctor-pdf.
It would be nice if the PML converter will also support the Rouge highlighter, especially once we the PML lexer is complete.
Beta Was this translation helpful? Give feedback.
All reactions