Skip to content

Commit a7c3ee2

Browse files
committed
Remove codechat mapping for runestone builds
1 parent eab1cc9 commit a7c3ee2

3 files changed

Lines changed: 18 additions & 13 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ Instructions: Add a subsection under `[Unreleased]` for additions, fixes, change
99

1010
## [Unreleased]
1111

12+
### Changed
13+
14+
- Runestone builds no longer try to generate codechat mapping (if you want to use codechat previews, use a non-runestone html build).
15+
1216
## [2.30.1] - 2025-11-10
1317

1418
Includes updates to core through commit: [e406b5c](https://github.com/PreTeXtBook/pretext/commit/e406b5c742d50f7b75a78aa5eac75bb285ad35b1)

pretext/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
VERSION = get_version("pretext", Path(__file__).parent.parent)
2020

2121

22-
CORE_COMMIT = "e406b5c742d50f7b75a78aa5eac75bb285ad35b1"
22+
CORE_COMMIT = "ad3ef3fb102bf393b9fe33ecb242848e5ca6b0df"
2323

2424

2525
def activate() -> None:

pretext/project/__init__.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -754,18 +754,19 @@ def build(
754754
dest_dir=self.output_dir_abspath().as_posix(),
755755
ext_rs_methods=utils.rs_methods,
756756
)
757-
try:
758-
codechat.map_path_to_xml_id(
759-
self.source_abspath(),
760-
self._project.abspath(),
761-
self.output_dir_abspath().as_posix(),
762-
)
763-
except Exception as e:
764-
log.warning(
765-
"Failed to map codechat path to xml id; codechat will not work."
766-
)
767-
log.debug(f"Error: {e}")
768-
log.debug("Traceback:", exc_info=True)
757+
if self.platform != Platform.RUNESTONE:
758+
# On non-runestone builds, we try to create a codechat mapping for authors.
759+
try:
760+
codechat.map_path_to_xml_id(
761+
self.source_abspath(),
762+
self._project.abspath(),
763+
self.output_dir_abspath().as_posix(),
764+
)
765+
except Exception as e:
766+
log.warning(
767+
"Failed to map codechat path to xml id; codechat will not work."
768+
)
769+
log.debug(e, exc_info=True)
769770
elif self.format == Format.PDF:
770771
core.pdf(
771772
xml=self.source_abspath(),

0 commit comments

Comments
 (0)