diff --git a/pyproject.toml b/pyproject.toml index fab863c..26008a8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ namespaces = true # ----------------------------------------- Project Metadata ------------------------------------- # [project] -version = "0.0.0.dev36" +version = "0.0.0.dev37" name = "LoggerMan" dependencies = [ "MDit == 0.0.0.dev12", diff --git a/src/loggerman/logger.py b/src/loggerman/logger.py index 8a4aacc..45c07a7 100644 --- a/src/loggerman/logger.py +++ b/src/loggerman/logger.py @@ -177,7 +177,7 @@ def process_exit_code(): "critical": _LogLevelData(level=LogLevel.CRITICAL, style=level_style_critical), } self._target_configs_md = target_configs_md - self._target_configs_rich = target_configs_rich + self._target_configs_rich = target_configs_rich or {"console": _mdit.target.console()} self._target_default_md = target_default_md self._target_default_rich = target_default_rich in_github = github if github is not None else _actionman.in_gha() @@ -368,10 +368,12 @@ def section( ): if not self._initialized: self.initialize() + heading_configs = self._target_configs_rich[self._target_default_rich].heading heading = _mdit.element.heading( title, level=self._next_section_num, explicit_number=True, + config_rich=heading_configs[min(len(self._next_section_num), len(heading_configs)) - 1] ) section_num = ".".join(str(num) for num in self._next_section_num) self._curr_section_name = f"{section_num}. {title}"