mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-28 22:25:32 -04:00
Indent @-directives and set them upercase
This commit is contained in:
parent
233cc04966
commit
f76adaefd7
224 changed files with 1372 additions and 1370 deletions
|
|
@ -32,7 +32,7 @@ def format_line(line: str) -> str:
|
|||
def indent(lines: List[str]) -> List[str]:
|
||||
output = []
|
||||
for line in lines:
|
||||
output.append(f" {line}" if not line.startswith("@") else line)
|
||||
output.append(f" {line}")
|
||||
return output
|
||||
|
||||
|
||||
|
|
@ -91,7 +91,9 @@ class Preprocessor(Child):
|
|||
self.sortkey = "" # Pre-processor lines are not sortable.
|
||||
|
||||
def render(self, verbatim: bool) -> List[str]:
|
||||
return self.preamble + [self.line]
|
||||
tokens = self.line.split(" ", 1)
|
||||
tokens[0] = tokens[0].upper()
|
||||
return self.preamble + [" ".join(tokens)]
|
||||
|
||||
|
||||
# ======================================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue