highlightjs / highlightjs/highlight.js

[Request] Doctest highlighting for Python

Open
#3,718 5 comments 0 reactions 0 assignees View on GitHub
enhancement help welcome parser
Dominant language
JavaScript
Stars
25k
Forks
3.8k
Avg merge
11h 35m
Merged PRs (30d)
3

Description

**Is your request related to a specific problem you're having?**

I'm frustrated when syntax highlighers ignore doctests in Python docstrings. When working in gitlab its hard for people to review doctests I write because the syntax isn't highlighted. I understand that this library is what gitlab uses for highlighting, so implementing support here should solve that issue.

**The solution you'd prefer / feature you'd like to see added...**

I would like to request support for highlighting doctest syntax in docstrings.

This feature is being added to rouge-ruby: https://github.com/rouge-ruby/rouge/pull/1932 and has been supported by vim for years:

![image](https://user-images.githubusercontent.com/3186211/219966820-e74b89b1-e518-4c8b-99c3-4c04a7b53867.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.