diff --git a/doc/_sphinx/extensions/dart_domain.py b/doc/_sphinx/extensions/dart_domain.py index 533ea87b11d..f67b5a7e0ea 100644 --- a/doc/_sphinx/extensions/dart_domain.py +++ b/doc/_sphinx/extensions/dart_domain.py @@ -167,15 +167,18 @@ def _scan_source_file_if_needed(self): self.record['timestamp'] = source_last_modified_time def _scan_source_file(self): - with tempfile.NamedTemporaryFile(mode='rt', suffix='json') as temp_file: + with tempfile.NamedTemporaryFile(mode='rt', suffix='.json', delete=False) as temp_file: try: + temp_file.close() subprocess.run( ['dartdoc_json', self.source_file, '--output', temp_file.name], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, check=True, + shell=True, ) - json_string = temp_file.read() + with open(temp_file.name, 'r') as t: + json_string = t.read() return self._extract_symbol(json_string) except subprocess.CalledProcessError as e: cmd = ' '.join(e.cmd) @@ -183,6 +186,8 @@ def _scan_source_file(self): f'Command `{cmd}` returned with exit status' f' {e.returncode}\n{e.output.decode("utf-8")}' ) + finally: + os.remove(temp_file.name) def _extract_symbol(self, json_string: str) -> Dict: """ diff --git a/doc/_sphinx/make.bat b/doc/_sphinx/make.bat index 06987ea9e0d..2ed8915002d 100644 --- a/doc/_sphinx/make.bat +++ b/doc/_sphinx/make.bat @@ -36,7 +36,7 @@ if "%1" == "livehtml" ( goto end :livehtml -sphinx-autobuild %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %2 +sphinx-autobuild %SOURCEDIR% %BUILDDIR%\html %SPHINXOPTS% %2 --ignore "**/.*" --ignore "*build*" --open-browser :build %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %2 diff --git a/doc/flame/flame.md b/doc/flame/flame.md index 289c51c179a..c540c54abce 100644 --- a/doc/flame/flame.md +++ b/doc/flame/flame.md @@ -32,5 +32,6 @@ Camera Component Inputs Rendering Layout +Overlays Other ``` diff --git a/doc/tutorials/platformer/step_7.md b/doc/tutorials/platformer/step_7.md index 30bfce78243..bd4da639e62 100644 --- a/doc/tutorials/platformer/step_7.md +++ b/doc/tutorials/platformer/step_7.md @@ -1,7 +1,7 @@ # 7. Adding Menus To add menus to the game, we will leverage Flame's built-in -[overlay](../../flame/game.md#flutter-widgets-and-game-instances) system. +[overlay](../../flame/overlays.md) system. ## Main Menu