@@ -31,6 +31,8 @@ class NbReader:
3131 """The configuration for parsing markdown cells."""
3232 read_fmt : dict | None = dc .field (default = None )
3333 """The type of the reader, if known."""
34+ support_cell_ids : bool = False
35+ """Whether the format supports stable cell IDs"""
3436
3537
3638def standard_nb_read (text : str ) -> nbf .NotebookNode :
@@ -75,7 +77,11 @@ def create_nb_reader(
7577 if commonmark_only :
7678 # Markdown cells should be read as Markdown only
7779 md_config = dc .replace (md_config , commonmark_only = True )
78- return NbReader (partial (reader , ** (reader_kwargs or {})), md_config ) # type: ignore
80+ return NbReader (
81+ partial (reader , ** (reader_kwargs or {})), # type: ignore
82+ md_config ,
83+ support_cell_ids = suffix == ".ipynb" ,
84+ )
7985
8086 # a Markdown file is a special case, since we only treat it as a notebook,
8187 # if it starts with certain "top-matter"
@@ -89,6 +95,7 @@ def create_nb_reader(
8995 ),
9096 md_config ,
9197 {"type" : "plugin" , "name" : "myst_nb_md" },
98+ support_cell_ids = False ,
9299 )
93100
94101 # if we get here, we did not find a reader
0 commit comments