Skip to content

Commit a9c704e

Browse files
authored
Merge pull request #189 from agriyakhetarpal/fix/invalid-tags
Fix invalid schema for `jupyterlite_sphinx_strip` tag when `strip_tagged_cells` is `True`
2 parents 49af6b0 + 5dffe6d commit a9c704e

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

docs/configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ and then by tagging the cells you want to strip with the tag `jupyterlite_sphinx
6868
of the cell, like this:
6969

7070
```json
71-
{
71+
"metadata": {
7272
"tags": [
73-
"jupyterlite_sphinx_strip": "true"
73+
"jupyterlite_sphinx_strip"
7474
]
7575
}
7676
```
@@ -89,7 +89,7 @@ in the JupyterLite console:
8989
"cell_type": "markdown",
9090
"metadata": {
9191
"tags": [
92-
"jupyterlite_sphinx_strip": "true"
92+
"jupyterlite_sphinx_strip"
9393
]
9494
},
9595
"source": [

jupyterlite_sphinx/jupyterlite_sphinx.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,13 +351,11 @@ def run(self):
351351
# is so that we don't end up removing useful data or directives that
352352
# are not meant to be removed.
353353

354-
nb = nbformat.read(notebook, as_version=4)
355-
print(f"Opened {notebook_name}")
356354
nb = nbformat.read(notebook, as_version=4)
357355
nb.cells = [
358356
cell
359357
for cell in nb.cells
360-
if "true" not in cell.metadata.get("jupyterlite_sphinx_strip", [])
358+
if "jupyterlite_sphinx_strip" not in cell.metadata.get("tags", [])
361359
]
362360
nbformat.write(nb, notebooks_dir, version=4)
363361

0 commit comments

Comments
 (0)