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 line = unicode(line, 'utf-8')
67 if descriptions and line.startswith('Maintainers'):
69 # Ensure a blank line following the last "|"-prefixed line.
73 # between the Maintainers heading and the first subsystem name.
75 if re.search('^[A-Z0-9]', line):
79 line = line.rstrip()
81 # Linkify all non-wildcard refs to ReST files in Documentation/.
83 m = re.search(pat, line)
86 line = re.sub(pat, ':doc:`%s <../%s>`' % (m.group(2), m.group(2)), line)
92 output = "| %s" % (line.replace("\\", "\\\\"))
93 # Look for and record field letter to field name mappings:
95 m = re.search("\s(\S):\s", line)
99 m = re.search("\*([^\*]+)\*", line)
104 if len(line) == 0:
107 if line[1] != ':':
109 # SUBSYSTEM NAME
116 # Collapse whitespace in subsystem name.
117 heading = re.sub("\s+", " ", line)
124 field, details = line.split(':', 1)
146 output = line
148 # Re-split on any added newlines in any above parsing.
154 if line.startswith('----------'):
160 # Retain previous line for state machine transitions.
161 prev = line
169 # For debugging the pre-rendered results...
178 raise self.warning('"%s" directive disabled.' % self.name)
195 (self.name, ErrorString(error)))