better default for docstrip guards

This commit is contained in:
Maximilian Keßler 2022-02-17 20:14:50 +01:00
parent ed004aaf33
commit 92be6e446c

View file

@ -298,6 +298,9 @@ class FormattingConfig(Config):
@property
def docstrip_guards(self) -> List[str]:
if self._docstrip_guards is None:
if self.tex_type in [TeXType.TeXDocstrip]:
return [self.tex_type.value]
else:
return []
else:
return self._docstrip_guards