perldoc.py 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. """
  2. pygments.styles.perldoc
  3. ~~~~~~~~~~~~~~~~~~~~~~~
  4. Style similar to the style used in the `perldoc`_ code blocks.
  5. .. _perldoc: http://perldoc.perl.org/
  6. :copyright: Copyright 2006-2021 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 PerldocStyle(Style):
  13. """
  14. Style similar to the style used in the perldoc code blocks.
  15. """
  16. background_color = '#eeeedd'
  17. default_style = ''
  18. styles = {
  19. Whitespace: '#bbbbbb',
  20. Comment: '#228B22',
  21. Comment.Preproc: '#1e889b',
  22. Comment.Special: '#8B008B bold',
  23. String: '#CD5555',
  24. String.Heredoc: '#1c7e71 italic',
  25. String.Regex: '#B452CD',
  26. String.Other: '#cb6c20',
  27. String.Regex: '#1c7e71',
  28. Number: '#B452CD',
  29. Operator.Word: '#8B008B',
  30. Keyword: '#8B008B bold',
  31. Keyword.Type: '#00688B',
  32. Name.Class: '#008b45 bold',
  33. Name.Exception: '#008b45 bold',
  34. Name.Function: '#008b45',
  35. Name.Namespace: '#008b45 underline',
  36. Name.Variable: '#00688B',
  37. Name.Constant: '#00688B',
  38. Name.Decorator: '#707a7c',
  39. Name.Tag: '#8B008B bold',
  40. Name.Attribute: '#658b00',
  41. Name.Builtin: '#658b00',
  42. Generic.Heading: 'bold #000080',
  43. Generic.Subheading: 'bold #800080',
  44. Generic.Deleted: '#aa0000',
  45. Generic.Inserted: '#00aa00',
  46. Generic.Error: '#aa0000',
  47. Generic.Emph: 'italic',
  48. Generic.Strong: 'bold',
  49. Generic.Prompt: '#555555',
  50. Generic.Output: '#888888',
  51. Generic.Traceback: '#aa0000',
  52. Error: 'bg:#e3d2d2 #a61717'
  53. }