Lines Matching +full:in +full:- +full:line

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
16 specific to the Linux kernel's standard "MAINTAINERS" file, in an
32 app.add_directive("maintainers-include", MaintainersInclude)
40 u"""MaintainersInclude (``maintainers-include``) directive"""
44 """Parse all the MAINTAINERS lines into ReST for human-readability"""
63 for line in open(path):
65 if descriptions and line.startswith('Maintainers'):
67 # Ensure a blank line following the last "|"-prefixed line.
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)
83 # maintainers.rst is in a subdirectory, so include "../".
84 line = re.sub(pat, ':doc:`%s <../%s>`' % (m.group(2), m.group(2)), line)
89 # Escape the escapes in preformatted text.
90 output = "| %s" % (line.replace("\\", "\\\\"))
93 m = re.search(r"\s(\S):\s", line)
96 if field_letter and not field_letter in fields:
97 m = re.search(r"\*([^\*]+)\*", line)
102 if len(line) == 0:
105 if line[1] != ':':
114 # Collapse whitespace in subsystem name.
115 heading = re.sub(r"\s+", " ", line)
122 field, details = line.split(':', 1)
127 if field in ['F', 'N', 'X', 'K']:
129 if not ':doc:' in details:
133 if field == field_prev and field_prev in ['M', 'R', 'L']:
144 output = line
146 # Re-split on any added newlines in any above parsing.
148 for separated in output.split('\n'):
152 if line.startswith('----------'):
158 # Retain previous line for state machine transitions.
159 prev = line
163 for separated in field_content.split('\n'):
167 # For debugging the pre-rendered results...