fix some bugs related to macros
This commit is contained in:
parent
b0077a3ee9
commit
f2ba97cabe
3 changed files with 8 additions and 7 deletions
|
@ -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:
|
||||
configs = self._formatter.format(
|
||||
target_root.path if isinstance(target_root, RelativePath) else target_root
|
||||
)
|
||||
except Exception as e:
|
||||
raise NotImplementedError
|
||||
# try:
|
||||
configs = self._formatter.format(
|
||||
target_root.path if isinstance(target_root, RelativePath) else target_root
|
||||
)
|
||||
# except Exception as e:
|
||||
# raise NotImplementedError
|
||||
rel_configs = [
|
||||
(self._relative_path.with_name(filename), config)
|
||||
for [filename, config] in configs
|
||||
|
|
|
@ -31,7 +31,7 @@ def get_default_macros(tex_flavour: TeXFlavour):
|
|||
ConfigEndMacro(),
|
||||
ConfigBeginMacro(),
|
||||
MacroCodeBeginMacro(),
|
||||
MacroCodeBeginMacro(),
|
||||
MacroCodeEndMacro(),
|
||||
]
|
||||
tex2 = [
|
||||
ArgumentMacro(
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue