enable syntax highlighting for inline code (#17585)

* enable syntax highlighting for inline code

* finish '.. default-role' and preliminary '.. role'

implementation

* more compact check in dirRole

* set :literal: as default role for *.rst

* Update lib/packages/docutils/rst.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* use whichRole for setting currRoleKind

* Update lib/packages/docutils/rst.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* rename rnGeneralRole -> rnUnknownRole

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
This commit is contained in:
Andrey Makarov 2021-04-02 23:11:44 +03:00 • committed by GitHub
commit e35946f306
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 239 additions and 51 deletions

View file

@ -5,6 +5,10 @@ Not a Nim Manual
:Authors: Andreas Rumpf, Zahary Karadjov
:Version: |nimversion|
.. role:: nim(code)
:language: nim
.. default-role:: nim
.. contents::