-
Notifications
You must be signed in to change notification settings - Fork 750
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
port bw style from Pygments to Rouge
- Loading branch information
1 parent
e957c74
commit 506a764
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# -*- coding: utf-8 -*- # | ||
# frozen_string_literal: true | ||
|
||
module Rouge | ||
module Themes | ||
# A port of the bw style from Pygments. | ||
# See https://bitbucket.org/birkenfeld/pygments-main/src/default/pygments/styles/bw.py | ||
class BlackWhiteTheme < CSSTheme | ||
name 'bw' | ||
|
||
style Text, :fg => '#000000', :bg => '#ffffff' | ||
|
||
style Comment, :italic => true | ||
style Comment::Preproc, :italic => false | ||
|
||
style Keyword, :bold => true | ||
style Keyword::Pseudo, :bold => false | ||
style Keyword::Type, :bold => false | ||
|
||
style Operator, :bold => true | ||
|
||
style Name::Class, :bold => true | ||
style Name::Namespace, :bold => true | ||
style Name::Exception, :bold => true | ||
style Name::Entity, :bold => true | ||
style Name::Tag, :bold => true | ||
|
||
style Literal::String, :italic => true | ||
style Literal::String::Interpol, :bold => true | ||
style Literal::String::Escape, :bold => true | ||
|
||
style Generic::Heading, :bold => true | ||
style Generic::Subheading, :bold => true | ||
style Generic::Emph, :italic => true | ||
style Generic::Strong, :bold => true | ||
style Generic::Prompt, :bold => true | ||
|
||
style Error, :fg => '#FF0000' | ||
end | ||
end | ||
end |