8000 minor #12067 Updated the lexer used to highlight terminal blocks (jav… · symfony/symfony-docs@eebc2e4 · GitHub
[go: up one dir, main page]

Skip to content

Commit eebc2e4

Browse files
committed
minor #12067 Updated the lexer used to highlight terminal blocks (javiereguiluz)
This PR was merged into the 3.4 branch. Discussion ---------- Updated the lexer used to highlight terminal blocks This should fix #12060 and all the related issues which were reported in the past. Now we only consider something is a Windows prompt if it starts with `C:\` and ends with `>`, so `C:\>`, `C:\Users\Administrator>`, `C:\Users\Someone\Projects\AcmeProject>`, etc. Commits ------- 2e2a869 Updated the lexer used to highlight terminal blocks
2 parents 65ebc03 + 2e2a869 commit eebc2e4

File tree

1 file changed

+1
-1
lines changed
  • _build/_themes/_exts/symfonycom/sphinx

1 file changed

+1
-1
lines changed

_build/_themes/_exts/symfonycom/sphinx/lexer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class TerminalLexer(RegexLexer):
1010
tokens = {
1111
'root': [
1212
('^\$', Generic.Prompt, 'bash-prompt'),
13-
('^[^\n>]+>', Generic.Prompt, 'dos-prompt'),
13+
('^C:\\[^\n>]+>', Generic.Prompt, 'dos-prompt'),
1414
('^#.+$', Comment.Single),
1515
('^.+$', Generic.Output),
1616
],

0 commit comments

Comments
 (0)
0