Path: blob/master/source/_themes/flask_theme_support.py
1241 views
# flasky extensions. flasky pygments style based on tango style1from pygments.style import Style2from pygments.token import Keyword, Name, Comment, String, Error, \3Number, Operator, Generic, Whitespace, Punctuation, Other, Literal456class FlaskyStyle(Style):7background_color = "#f8f8f8"8default_style = ""910styles = {11# No corresponding class for the following:12#Text: "", # class: ''13Whitespace: "underline #f8f8f8", # class: 'w'14Error: "#a40000 border:#ef2929", # class: 'err'15Other: "#000000", # class 'x'1617Comment: "italic #8f5902", # class: 'c'18Comment.Preproc: "noitalic", # class: 'cp'1920Keyword: "bold #004461", # class: 'k'21Keyword.Constant: "bold #004461", # class: 'kc'22Keyword.Declaration: "bold #004461", # class: 'kd'23Keyword.Namespace: "bold #004461", # class: 'kn'24Keyword.Pseudo: "bold #004461", # class: 'kp'25Keyword.Reserved: "bold #004461", # class: 'kr'26Keyword.Type: "bold #004461", # class: 'kt'2728Operator: "#582800", # class: 'o'29Operator.Word: "bold #004461", # class: 'ow' - like keywords3031Punctuation: "bold #000000", # class: 'p'3233# because special names such as Name.Class, Name.Function, etc.34# are not recognized as such later in the parsing, we choose them35# to look the same as ordinary variables.36Name: "#000000", # class: 'n'37Name.Attribute: "#c4a000", # class: 'na' - to be revised38Name.Builtin: "#004461", # class: 'nb'39Name.Builtin.Pseudo: "#3465a4", # class: 'bp'40Name.Class: "#000000", # class: 'nc' - to be revised41Name.Constant: "#000000", # class: 'no' - to be revised42Name.Decorator: "#888", # class: 'nd' - to be revised43Name.Entity: "#ce5c00", # class: 'ni'44Name.Exception: "bold #cc0000", # class: 'ne'45Name.Function: "#000000", # class: 'nf'46Name.Property: "#000000", # class: 'py'47Name.Label: "#f57900", # class: 'nl'48Name.Namespace: "#000000", # class: 'nn' - to be revised49Name.Other: "#000000", # class: 'nx'50Name.Tag: "bold #004461", # class: 'nt' - like a keyword51Name.Variable: "#000000", # class: 'nv' - to be revised52Name.Variable.Class: "#000000", # class: 'vc' - to be revised53Name.Variable.Global: "#000000", # class: 'vg' - to be revised54Name.Variable.Instance: "#000000", # class: 'vi' - to be revised5556Number: "#990000", # class: 'm'5758Literal: "#000000", # class: 'l'59Literal.Date: "#000000", # class: 'ld'6061String: "#4e9a06", # class: 's'62String.Backtick: "#4e9a06", # class: 'sb'63String.Char: "#4e9a06", # class: 'sc'64String.Doc: "italic #8f5902", # class: 'sd' - like a comment65String.Double: "#4e9a06", # class: 's2'66String.Escape: "#4e9a06", # class: 'se'67String.Heredoc: "#4e9a06", # class: 'sh'68String.Interpol: "#4e9a06", # class: 'si'69String.Other: "#4e9a06", # class: 'sx'70String.Regex: "#4e9a06", # class: 'sr'71String.Single: "#4e9a06", # class: 's1'72String.Symbol: "#4e9a06", # class: 'ss'7374Generic: "#000000", # class: 'g'75Generic.Deleted: "#a40000", # class: 'gd'76Generic.Emph: "italic #000000", # class: 'ge'77Generic.Error: "#ef2929", # class: 'gr'78Generic.Heading: "bold #000080", # class: 'gh'79Generic.Inserted: "#00A000", # class: 'gi'80Generic.Output: "#888", # class: 'go'81Generic.Prompt: "#745334", # class: 'gp'82Generic.Strong: "bold #000000", # class: 'gs'83Generic.Subheading: "bold #800080", # class: 'gu'84Generic.Traceback: "bold #a40000", # class: 'gt'85}868788