-
Notifications
You must be signed in to change notification settings - Fork 171
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
feat: marked extensions #230
base: master
Are you sure you want to change the base?
Conversation
Seems legit. This should only cover extensions that are not possible to implement as Nuemark extensions/tags. Footnote is probably the only one. Anything else? |
Well, you can also add all the other marked extensions. e.g.
https://marked.js.org/using_advanced#extensions Still WIP, as I have to do the todos, and want to use BTW, I think, this config isn't needed, as the options are deprecated ( |
Rebased on #232 and removed deprecated options. Still have the todo's open... Edit:
|
I've reached the conclusion, that for now, I'll just define the config file name to (An alternative I thought of was to create a The current loading variant for marked extensions also does not allow changing the marked extensions at runtime, but I don't think that's a big problem.
I have deleted that part from the code I've also added The only thing, that's left (for now), would be tests. (Also haven't looked into the |
Fixed the test, forgot some quotation marks... and for some reason the rendered md, is escaped, when run with nuekit. Currently, the test is not run, because This is now ready for review. |
Looks solid. I did some changes to how header id's are rendered on the dev branch. Can you check if this causes any conflicts when merging to dev? Thanks! |
I'm relatively sure, it will result in merge conflicts. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
When I use the workspace packages (using changes from #261), the tests with Bun in contrast resolves the absolute path correctly without problems. The same goes for npm if I link the nuekit package to some test project. I think, it just fails in the jest environment... I haven't checked it with bun+jest yet. If it still occurs there, I can be sure that jest is the culprit. It might also be an Edit: I think |
Docs: Fix typos
…esting test: use workspace package versions
I'm currently revisiting this, and slowly losing confidence of resolving this path-resolution issue or whatever this might be... Any help or ideas are highly appreciated 😅 Thanks |
WIP
/POC
implementation for marked extension loading.Description
The default file to load from is
marked.config.js
but this can be changed using themarked_config
key insite.yaml
.The provided file path currently has to be relative to the
root
folder of the project / the root passed tonue
commandThe config
js
file has to be of format:If no file is found, the import() function silently returns an empty object which, on unpacking, results in an empty list for
marked_extensions
variableTODO
Notes
Maybe allow additional renderers with the following?