Skip to content
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

Address issue 1004 ("\n in mo.md literally interperted in markdown mode") #1038

Merged

Conversation

fuenfundachtzig
Copy link
Contributor

@fuenfundachtzig fuenfundachtzig commented Mar 31, 2024

This only replaces the dedent library by dedent-js.

For details, see #1004.

Copy link

vercel bot commented Mar 31, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 9, 2024 8:23pm
marimo-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 9, 2024 8:23pm

@dmadisetti
Copy link
Collaborator

dedent-js hasn't been maintained in 10yrs, I think dendent is the correct dependency

Maybe just open an issue in dedent? Alternatively, it's a trivial dep and could be moved to just utils with the patch

@akshayka
Copy link
Contributor

akshayka commented Mar 31, 2024

dedent-js hasn't been maintained in 10yrs, I think dendent is the correct dependency

Maybe just open an issue in dedent? Alternatively, it's a trivial dep and could be moved to just utils with the patch

I wasn't aware it wasn't maintained.

I'd be fine with either of those solutions, thanks for the suggestions.

@dmadisetti
Copy link
Collaborator

dmadisetti commented Apr 3, 2024

I think this package works: https://github.com/jridgewell/string-dedent

It's listed as the example in the proposal to add String.dedent to JavaScript, so would probably get polyfill support too if the proposal goes through

Edit: see discussion: tc39/proposal-string-dedent#80

@akshayka
Copy link
Contributor

akshayka commented Apr 4, 2024

@fuenfundachtzig would you like to update this PR to use string-dedent instead?

@fuenfundachtzig
Copy link
Contributor Author

Sure, can do!

@fuenfundachtzig
Copy link
Contributor Author

Now using string-dedent.

Copy link
Collaborator

@dmadisetti dmadisetti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I added some tests in fuenfundachtzig#1
and they pass for me.

});

it("should handle space around the f=strings", () => {
it("should handle space around the f-strings", () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it("doesn't do this")

Looks like a quick copypaste from a different test, will update in my pr

@akshayka
Copy link
Contributor

akshayka commented Apr 8, 2024

LGTM, I added some tests in fuenfundachtzig#1 and they pass for me.

Thank you! @fuenfundachtzig, LGTM once @dmadisetti's PR is merged.

Copy link
Contributor

@akshayka akshayka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woohoo! Thank you @fuenfundachtzig and @dmadisetti.

@akshayka akshayka merged commit 38f81e6 into marimo-team:main Apr 9, 2024
26 checks passed
Copy link

github-actions bot commented Apr 9, 2024

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.3.11-dev8

Benni-Math pushed a commit to Benni-Math/marimo that referenced this pull request Apr 16, 2024
…de") (marimo-team#1038)

* swap out dedent for dedent-js

* switched to string-dedent

* added r-string tests for dedent-js

* Fixed misnamed test

---------

Co-authored-by: dylan madisetti <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants