perldoc.py 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # -*- coding: utf-8 -*-
  2. """
  3. pygments.styles.perldoc
  4. ~~~~~~~~~~~~~~~~~~~~~~~
  5. Style similar to the style used in the `perldoc`_ code blocks.
  6. .. _perldoc: http://perldoc.perl.org/
  7. :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
  8. :license: BSD, see LICENSE for details.
  9. """
  10. from pygments.style import Style
  11. from pygments.token import Keyword, Name, Comment, String, Error, \
  12. Number, Operator, Generic, Whitespace
  13. class PerldocStyle(Style):
  14. """
  15. Style similar to the style used in the perldoc code blocks.
  16. """
  17. background_color = '#eeeedd'
  18. default_style = ''
  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.Prompt: '#555555',
  51. Generic.Output: '#888888',
  52. Generic.Traceback: '#aa0000',
  53. Error: 'bg:#e3d2d2 #a61717'
  54. }