fix some bugs related to macros

This commit is contained in:
Maximilian Keßler 2022-02-17 21:39:01 +01:00
parent b0077a3ee9
commit f2ba97cabe
3 changed files with 8 additions and 7 deletions

View file

@ -72,12 +72,12 @@ class PyTeXSourceFile:
def format(self, target_root: Union[Path, RelativePath]) -> List[Tuple[RelativePath, FormattingConfig]]:
if self._formatter is None:
raise NotImplementedError # TODO
try:
# try:
configs = self._formatter.format(
target_root.path if isinstance(target_root, RelativePath) else target_root
)
except Exception as e:
raise NotImplementedError
# except Exception as e:
# raise NotImplementedError
rel_configs = [
(self._relative_path.with_name(filename), config)
for [filename, config] in configs

View file

@ -31,7 +31,7 @@ def get_default_macros(tex_flavour: TeXFlavour):
ConfigEndMacro(),
ConfigBeginMacro(),
MacroCodeBeginMacro(),
MacroCodeBeginMacro(),
MacroCodeEndMacro(),
]
tex2 = [
ArgumentMacro(

View file

@ -12,6 +12,7 @@ class DTXFormatter(TexFormatter):
def dependencies(self) -> List[str]:
return [] # TODO
@property
def future_config(self) -> List[Tuple[str, FormattingConfig]]:
return [] # TODO