-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Built-in extensions #4
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These helper functions are well-suited for testing extensions, which requires mocking schema.Cell and schema.Notebook.
This allows other packages to pass their own Option implementations without relying on the unexported *renderer.
These are the 2 most popular Markdown renderers, which can no be passed as extensions and used to render markdown cells (without actually pulling them in as package deps)
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #4 +/- ##
==========================================
+ Coverage 81.27% 81.96% +0.68%
==========================================
Files 7 11 +4
Lines 534 571 +37
==========================================
+ Hits 434 468 +34
- Misses 81 83 +2
- Partials 19 20 +1 ☔ View full report in Codecov by Sentry. |
Collected all adapters in a single extension/adapter package, because there is a lot of shared logic and structure and no naming clashes.
The testing package got the corresponding fixture and is now made public (internal/test -> pkg/test) so that it can be used in external packages providing nb extensions.
bevzzz
force-pushed
the
feat/built-in-extensions
branch
from
January 25, 2024 12:35
e090cd6
to
3d5fc77
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As the Roadmap mentions, v0.2.0 is going to feature several extensions to improve the quality of the generated HTML.
This PR adds adapters for several popular packages that can now be passed as external dependencies:
extension.NewMarkdown
allows usinggoldmark
,blackfriday
(or any custom function for that matter) to render markdown cellsextension.AnsiHtml
allows usingansihtml
to convert ANSI colours in "stream" and "error" output cells to styled HTML.pkg/test
provides useful test doubles and helper functions (previouslyinternal/test
)