Skip to content

feat: Add metadata filtering options#17

Merged
Yahiewi merged 2 commits into
notebook-link:mainfrom
Yahiewi:config
Jun 15, 2026
Merged

feat: Add metadata filtering options#17
Yahiewi merged 2 commits into
notebook-link:mainfrom
Yahiewi:config

Conversation

@Yahiewi

@Yahiewi Yahiewi commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

This PR adds support for filtering notebook and cell metadata during serialization using Jupytext-style filter strings.

Main changes:

-The default exclusions of cleanCellMetadata in utils.ts now match Jupytext's exact default cell filter: autoscroll, collapsed, scrolled, trusted, and ExecuteTime.
-Implemented filterMetadata in utils.ts supporting wildcards (all/none), exclusion paths (prefixed with -), and dot-notation for nested property evaluation (eg jupytext.text_representation.jupytext_version).
-Declared the shared SerializationOptions interface in notebook.ts
-Serializer Integration:
Updated toMystMd and toPy in to accept options?: SerializationOptions and apply the filters before generating plaintext output.
-Added tests to serialize.test.tsto test different filterMetadata scenarios.

@Yahiewi Yahiewi added the enhancement New feature or request label Jun 15, 2026
@Yahiewi Yahiewi merged commit bd258c2 into notebook-link:main Jun 15, 2026
2 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant