perldoc.py 2.2 KB

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