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

Rich text editor | Update dependency on prosemirror-markdown #1526

Merged
merged 7 commits into from
Sep 14, 2023
Merged
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Mixed bold and italics formatting corner cases fixed. Update dependency on prosemirror-markdown",
"packageName": "@ni/nimble-components",
"email": "[email protected]",
"dependentChangeType": "patch"
}
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/nimble-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"d3-scale": "^4.0.2",
"d3-selection": "^3.0.0",
"d3-zoom": "^3.0.0",
"prosemirror-markdown": "^1.11.0",
"prosemirror-markdown": "^1.11.2",
"prosemirror-model": "^1.19.2",
"tslib": "^2.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,46 @@ describe('Markdown serializer', () => {
html: '<strong><em>Bold and Italics</em></strong>',
markdown: '***Bold and Italics***'
},
{
name: 'Italics without spaces in between bold texts',
html: '<strong>Bold<em>italics</em>bold</strong>',
vivinkrishna-ni marked this conversation as resolved.
Show resolved Hide resolved
markdown: '**Bold*italics*bold**'
},
{
name: 'Italics with leading and trailing spaces in between bold texts',
html: '<strong>Bold<em> italics </em>bold</strong>',
markdown: '**Bold *italics* bold**'
},
{
name: 'Bold and italics with leading and trailing spaces in italics with isolated italics at the end',
html: '<strong>Bold<em> italics </em></strong><em>italics</em>',
markdown: '**Bold *italics*** *italics*'
},
{
name: 'Bold and italics with leading and trailing spaces in bold with isolated italics at the end',
html: '<strong> Bold <em>italics</em> </strong><em>italics</em>',
markdown: '**Bold *italics*** *italics*'
},
{
name: 'Bold and italics with leading and trailing spaces in both',
html: '<strong>Bold <em>italics</em> bold <em>italics </em></strong><em>italics</em>',
markdown: '**Bold *italics* bold *italics*** *italics*'
},
{
name: 'Bold without spaces in between italics texts',
html: '<em>Italics</em><strong><em>bold</em></strong><em>italics</em>',
markdown: '*Italics**bold**italics*'
},
{
name: 'Bold with leading and trailing spaces in between italics texts',
html: '<em>Italics</em><strong><em> bold </em></strong><em>italics</em>',
markdown: '*Italics **bold** italics*'
},
{
name: 'Italics and bold with leading and trailing spaces in bold with isolated bold at the end',
html: '<em>Italics </em><strong><em>bold </em>bold</strong>',
markdown: '*Italics **bold*** **bold**'
},
{
name: 'Numbered list',
html: '<ol><li><p>Numbered list</p></li></ol>',
Expand Down
Loading