trac.py 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # -*- coding: utf-8 -*-
  2. """
  3. pygments.styles.trac
  4. ~~~~~~~~~~~~~~~~~~~~
  5. Port of the default trac highlighter design.
  6. :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
  7. :license: BSD, see LICENSE for details.
  8. """
  9. from pygments.style import Style
  10. from pygments.token import Keyword, Name, Comment, String, Error, \
  11. Number, Operator, Generic, Whitespace
  12. class TracStyle(Style):
  13. """
  14. Port of the default trac highlighter design.
  15. """
  16. default_style = ''
  17. styles = {
  18. Whitespace: '#bbbbbb',
  19. Comment: 'italic #999988',
  20. Comment.Preproc: 'bold noitalic #999999',
  21. Comment.Special: 'bold #999999',
  22. Operator: 'bold',
  23. String: '#bb8844',
  24. String.Regex: '#808000',
  25. Number: '#009999',
  26. Keyword: 'bold',
  27. Keyword.Type: '#445588',
  28. Name.Builtin: '#999999',
  29. Name.Function: 'bold #990000',
  30. Name.Class: 'bold #445588',
  31. Name.Exception: 'bold #990000',
  32. Name.Namespace: '#555555',
  33. Name.Variable: '#008080',
  34. Name.Constant: '#008080',
  35. Name.Tag: '#000080',
  36. Name.Attribute: '#008080',
  37. Name.Entity: '#800080',
  38. Generic.Heading: '#999999',
  39. Generic.Subheading: '#aaaaaa',
  40. Generic.Deleted: 'bg:#ffdddd #000000',
  41. Generic.Inserted: 'bg:#ddffdd #000000',
  42. Generic.Error: '#aa0000',
  43. Generic.Emph: 'italic',
  44. Generic.Strong: 'bold',
  45. Generic.Prompt: '#555555',
  46. Generic.Output: '#888888',
  47. Generic.Traceback: '#aa0000',
  48. Error: 'bg:#e3d2d2 #a61717'
  49. }