-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Bug/4391 make markdown auto wrapping optional #4856
Bug/4391 make markdown auto wrapping optional #4856
Conversation
✅ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #4856 +/- ##
==========================================
- Coverage 5.75% 5.74% -0.01%
==========================================
Files 277 277
Lines 41726 41743 +17
Branches 27 27
==========================================
Hits 2400 2400
- Misses 39325 39342 +17
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Nice work @dreathed !
We'll have to remove the setConfig and getConfig imports, by passing the parameter inside an options object.
markdownToHTML(`Hello, how do you do?`, { markdownAutoWrap: false });
The e2e tests should not be failing.
Can you add an imgSnapshotTest anyway, we'll verify that here.
* develop: (935 commits) chore: Minor fixes chore: Build docs Use develop as base on develop branch. Update renovate json update link update announcement and blog pages Remove `--force` flag Tweak editor.bash update link chore: update browsers list Update integrations-community: add Drupal and module. Support Firefox Address review comments Change run symbol feat: Make the examples interactive in the documentation site. Add langium chore: update browsers list chore(deps): update all patch dependencies chore(deps): update all minor dependencies Update keywords and description ...
* develop: (21 commits) Linting chore: temp fix for eslint OOM chore: Update error snapshots Fix ESLint chore: Prettier chore: YOLO `pnpm --recursive update` chore: Remove commitlint Fix flowchart-elk render test chore: Add example page link in index chore: Remove cy.viewport fix: Cypress test for Suppress Error fix: Race condition when running suppressError test. fix: Retain default behavior when rendering errors cases chore: Add suppressErrorRendering to secure flags. fix: Remove blank SVG docs: Rebuild Add test Add test chore: Add suppressErrorRendering to config Throw error when detecting diagram type failed and `suppressErrorRendering` is set ...
* develop: Wait for image to be rendered Fix flowchart-elk render test chore: Add example page link in index fix: ELK diagram remove re-parsing Added linting fixed title bounds calculation, removed extra title from merging issues Centered Title function and changed rendering order for Elk flowchart to find Boundingbox Fixed styling for lines for ELK flowchart
…in-class-name * develop: (501 commits) Add extra test Add visual test Wait for image to be rendered Update docs Linting chore: temp fix for eslint OOM chore: Update error snapshots Fix ESLint chore: Prettier chore: YOLO `pnpm --recursive update` chore: Remove commitlint Fix flowchart-elk render test chore: Add example page link in index Fix flowchart-elk render test chore: Add example page link in index fix: Remove space which caused extra newline on diagrams fix: Remove repeated config calls fix: ELK diagram remove re-parsing chore: Minor fixes #4856 chore: Increase ESLint memory limit ...
* develop: (101 commits) Add extra test Add visual test Wait for image to be rendered Update docs Linting chore: temp fix for eslint OOM chore: Update error snapshots Fix ESLint chore: Prettier chore: YOLO `pnpm --recursive update` chore: Remove commitlint Fix flowchart-elk render test chore: Add example page link in index Fix flowchart-elk render test chore: Add example page link in index fix: Remove space which caused extra newline on diagrams fix: Remove repeated config calls fix: ELK diagram remove re-parsing chore: Minor fixes #4856 chore: Increase ESLint memory limit ...
📑 Summary
Hi! I'm new here and would like to be part of this awesome project! I'm still getting familiar with the code, so if I overlooked something, sorry in advance!
This PR solves the issue with auto wrapping markdown strings, by making auto wrapping optional for markdown strings.
Resolves #4391
📏 Design Decisions
I created a boolean option "markdownAutoWrap". If this option is set to false, then markdown strings are preprocessed, so that every whitespace is replaced by a " ". This way only explicit line breaks are rendered.
I added a unit test for the markdownToHTML function. I needed to import the setConfig function for testing.
I did not add a e2e test. BTW: 11 of 35 e2e tests fail. Can you tell me, whether this is a known issue or a problem on my side?
I updated the documentation for the flowchart.
I'm happy to get your feedback!
📋 Tasks
Make sure you
MERMAID_RELEASE_VERSION
is used for all new features.develop
branch