Lines Matching +full:line +full:- +full:name
2 # SPDX-License-Identifier: GPL-2.0
3 # -*- coding: utf-8; mode: python -*-
7 maintainers-include
10 Implementation of the ``maintainers-include`` reST-directive.
15 The ``maintainers-include`` reST-directive performs extensive parsing
32 app.add_directive("maintainers-include", MaintainersInclude)
40 u"""MaintainersInclude (``maintainers-include``) directive"""
44 """Parse all the MAINTAINERS lines into ReST for human-readability"""
55 # Field letter to field name mapping.
63 for line in open(path):
65 if descriptions and line.startswith('Maintainers'):
67 # Ensure a blank line following the last "|"-prefixed line.
71 # between the Maintainers heading and the first subsystem name.
73 if re.search('^[A-Z0-9]', line):
77 line = line.rstrip()
79 # Linkify all non-wildcard refs to ReST files in Documentation/.
81 m = re.search(pat, line)
84 line = re.sub(pat, ':doc:`%s <../%s>`' % (m.group(2), m.group(2)), line)
90 output = "| %s" % (line.replace("\\", "\\\\"))
91 # Look for and record field letter to field name mappings:
93 m = re.search(r"\s(\S):\s", line)
97 m = re.search(r"\*([^\*]+)\*", line)
102 if len(line) == 0:
105 if line[1] != ':':
107 # SUBSYSTEM NAME
114 # Collapse whitespace in subsystem name.
115 heading = re.sub(r"\s+", " ", line)
122 field, details = line.split(':', 1)
144 output = line
146 # Re-split on any added newlines in any above parsing.
152 if line.startswith('----------'):
158 # Retain previous line for state machine transitions.
159 prev = line
167 # For debugging the pre-rendered results...
176 raise self.warning('"%s" directive disabled.' % self.name)
193 (self.name, ErrorString(error)))