Skip to content

Commit

Permalink
add line break opportunity around /
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklx committed Sep 5, 2023
1 parent 60de6c2 commit 35016d5
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
4 changes: 2 additions & 2 deletions ember_debug/libs/view-inspection.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ function makeStylesheet(id) {
color: #000;
background: transparent;
max-width: 400px;
word-break: break-word;
word-wrap: break-word;
}
#${prefix}-tooltip-${id} .${prefix}-tooltip-arrow {
Expand Down Expand Up @@ -521,7 +521,7 @@ export default class ViewInspection {
if (Array.isArray(value)) {
this._renderTokens(td, value);
} else {
td.innerText = value;
td.innerText = value.replace(/\//g, '\u200B/\u200B');
}

tr.appendChild(th);
Expand Down
28 changes: 24 additions & 4 deletions tests/ember_debug/view-debug-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,12 @@ module('Ember Debug - View', function (hooks) {
.hasText('<TestFoo>');
assert
.dom('.ember-inspector-tooltip-detail-template', tooltip)
.hasText('my-app/templates/components/test-foo.hbs');
.hasText(
'my-app/templates/components/test-foo.hbs'.replace(
/\//g,
'\u200B/\u200B'
)
);
assert
.dom('.ember-inspector-tooltip-detail-instance', tooltip)
.hasText('App.TestFooComponent');
Expand Down Expand Up @@ -833,7 +838,12 @@ module('Ember Debug - View', function (hooks) {
.hasText('<TestBar>');
assert
.dom('.ember-inspector-tooltip-detail-template', tooltip)
.hasText('my-app/templates/components/test-bar.hbs');
.hasText(
'my-app/templates/components/test-bar.hbs'.replace(
/\//g,
'\u200B/\u200B'
)
);
assert
.dom('.ember-inspector-tooltip-detail-instance', tooltip)
.hasText(
Expand Down Expand Up @@ -874,7 +884,12 @@ module('Ember Debug - View', function (hooks) {
.hasText('<TestFoo>');
assert
.dom('.ember-inspector-tooltip-detail-template', tooltip)
.hasText('my-app/templates/components/test-foo.hbs');
.hasText(
'my-app/templates/components/test-foo.hbs'.replace(
/\//g,
'\u200B/\u200B'
)
);
assert
.dom('.ember-inspector-tooltip-detail-instance', tooltip)
.hasText('App.TestFooComponent');
Expand All @@ -898,7 +913,12 @@ module('Ember Debug - View', function (hooks) {
.hasText('<TestFoo>');
assert
.dom('.ember-inspector-tooltip-detail-template', tooltip)
.hasText('my-app/templates/components/test-foo.hbs');
.hasText(
'my-app/templates/components/test-foo.hbs'.replace(
/\//g,

Check failure on line 918 in tests/ember_debug/view-debug-test.js

View workflow job for this annotation

GitHub Actions / Test

Insert `··`
'\u200B/\u200B'

Check failure on line 919 in tests/ember_debug/view-debug-test.js

View workflow job for this annotation

GitHub Actions / Test

Insert `··`
)

Check failure on line 920 in tests/ember_debug/view-debug-test.js

View workflow job for this annotation

GitHub Actions / Test

Insert `··`
);
assert
.dom('.ember-inspector-tooltip-detail-instance', tooltip)
.hasText('App.TestFooComponent');
Expand Down

0 comments on commit 35016d5

Please sign in to comment.