-
-
Notifications
You must be signed in to change notification settings - Fork 180
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
Update marked lib to 9.0.0 (#474) #479
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
* chore: update to marked version 9 a new token `MARKDOWN_EXTENSIONS` has been added to provide extensions to marked usage example ``` { provide: MARKDOWN_EXTENSIONS, useValue: [gfmHeadingId()], } ``` update `readme.md` file - removed from the examples all the options that were removed - added section for the new marked extension token - removed the part that we need to add node_modules/marked/marked.min.js to our scripts since it's not needed breaking change - all options that were removed from marked has been deleted from this library too, see more at https://marked.js.org/using_advanced#options - some methods now return `Promise<string>` instead of `string`, because marked is doing so - `srcRelativeLink` input is removed as the baseUrl option has been removed from marked, use https://www.npmjs.com/package/marked-base-url instead * Update README.md * test: fix the Marked testing by providing it using Angular dependency rejection so it's possible to override it in the unit test it starts with ɵ so IDE doesn't provide it in autocomplete suggestions * feat: add `extensions` to the `MarkdownModuleConfig` remove unused `loader` from the `MarkdownModuleConfig` * Revert "feat: add `extensions` to the `MarkdownModuleConfig`" This reverts commit be713bf. * Re-add extensions to the MarkdownModuleConfig * Add missing unit tests --------- Co-authored-by: jfcere <[email protected]>
robertIsaac
approved these changes
Nov 8, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
robertIsaac
approved these changes
Nov 9, 2023
jfcere
added a commit
that referenced
this pull request
Nov 11, 2023
* chore: update to marked version 9 (#474) * chore: update to marked version 9 * Update README.md * test: fix the Marked testing by providing it using Angular dependency rejection * feat: add `extensions` to the `MarkdownModuleConfig` * Revert "feat: add `extensions` to the `MarkdownModuleConfig`" * Re-add extensions to the MarkdownModuleConfig * Add missing unit tests --------- Co-authored-by: jfcere <[email protected]> * Add removed unit tests * Rename markdown-extentions file * Injection tokens uniformization * Add async pipe to MarkdownPipe demo and documentation * Remove marked.min.js from angular.json * Fix overriding of renderer functions * Fix named import lint error --------- Co-authored-by: robertIsaac <[email protected]> Co-authored-by: jfcere <[email protected]>
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.
New features and enhancements
The property
markedExtensions
has been added toMarkdownModuleConfig
allowing to use marked extensions when configuringMarkdownModule
.⚠ Breaking changes
srcRelativeLink
input property is removed as thebaseUrl
option has been removed from marked, use https://www.npmjs.com/package/marked-base-url insteadPromise<string>
instead ofstring
, because marked is doing soMarkdownPipe
now returnsPromise<string>
instead ofstring
and will need to be combined withasync
pipe to work correctlymarkedOptions
andclipboardOptions
configuration properties used in theMarkdownModule.forRoot(config: MarkdownModuleConfig)
method now require to be provided with theMARKED_OPTIONS
andCLIPBOARD_OPTIONS
injection token.Additional information
marked.min.js
file in thescripts
section of theangular.json
when using@angular\cli
is no longer needed and can safely be removed as it is automatically imported.Special Thanks
🥇 Thanks to @robertIsaac for his contribution to update
marked
library and adding support for extensions.Fix #457, #387, #266, #239