Github user jablko commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/1303#discussion_r95615622
  
    --- Diff: doc/conf.py ---
    @@ -166,9 +166,71 @@
     nitpicky=1
     
     # Autolink issue references
    -# moved into traffic_server Sphinx extension
    -trafficserver_jira_url='https://issues.apache.org/jira/browse/'
    -trafficserver_github_url='https://github.com/apache/trafficserver/issues/'
    +# See Customizing the Parser in the docutils.parsers.rst module.
    +
    +from docutils import nodes
    +from docutils.parsers.rst import states
    +from docutils.utils import punctuation_chars
    +from docutils.utils import unescape
    +
    +# Customize parser.inliner in the only way that Sphinx supports.
    +# docutils.parsers.rst.Parser takes an instance of states.Inliner or a
    +# subclass but Sphinx initializes it from
    +# SphinxStandaloneReader.set_parser('restructuredtext') which is called
    +# from Publisher.set_components() and initializes the parser without
    +# arguments.
    +
    +BaseInliner = states.Inliner
    +class Inliner(BaseInliner):
    +  if hasattr(states.Inliner, 'init_customizations'):
    +    def init_customizations(self, settings):
    +      self.__class__ = BaseInliner
    +      BaseInliner.init_customizations(self, settings)
    +      self.__class__ = Inliner
    +
    +      # Copied from states.Inliner.init_customizations().
    --- End diff --
    
    In Docutils 0.13 start_string_prefix and end_string_suffix are locals. I'll 
improve this comment.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to