[DOCS-32] Add YANG pygment to do syntax highlighting of YANG code in reST Created: 11/Oct/16 Updated: 13/Apr/21 Resolved: 13/Apr/21 |
|
| Status: | Closed |
| Project: | docs |
| Component/s: | Toolchain |
| Affects Version/s: | unspecified |
| Fix Version/s: | Aluminium |
| Type: | Bug | ||
| Reporter: | Colin Dixon | Assignee: | Unassigned |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 6928 |
| Description |
|
The subject says it all. Pygments are described here: My guess is that we can use our current YANG lexer to make this easy, but I don't know how easy. |
| Comments |
| Comment by Robert Varga [ 27/Jan/17 ] |
|
https://github.com/vkosuri/lang-yang are two highlighters, which could be used as a baseline for getting something up and running. |
| Comment by Colin Dixon [ 02/Apr/17 ] |
|
This appears to be a functional lexer: It's from Carl Moberg, who was at tail-f and is now at Cisco seems to have written it. |
| Comment by Thanh Ha (zxiiro) [ 11/Aug/20 ] |
|
This was merged officially into pygments https://github.com/pygments/pygments/commit/04b4d08cf6bd8b0b7d0ca17de448ad950d81ea64 so should become available in the next release of pygments. Whenever that is. Expecting version either 2.6.2 or 2.7.x maybe. |