trac.py 1.9 KB

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