Skip to content

fix: Only insert <wbr> when there isn't a space before or after#6821

Merged
rjsparks merged 2 commits intoietf-tools:feat/clarityfrom
larseggert:fix-wbr
Dec 20, 2023
Merged

fix: Only insert <wbr> when there isn't a space before or after#6821
rjsparks merged 2 commits intoietf-tools:feat/clarityfrom
larseggert:fix-wbr

Conversation

@larseggert
Copy link
Copy Markdown
Collaborator

Fixes the issue @wkumari raised in email.

Comment thread ietf/static/js/ietf.js Outdated
.text();
// insert some <wbr> at strategic places
var newtext = text.replace(/([@._+])/g, "$1<wbr>");
var newtext = text.replace(/\S([@._+])\S/g, "$1<wbr>");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

"123.456".replace(/([@._+])/g, "$1<wbr>");
'123.<wbr>456'
"123.456".replace(/\S([@._+])\S/g, "$1<wbr>");
'12.<wbr>56'

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Doh. Thanks.

@wkumari
Copy link
Copy Markdown
Contributor

wkumari commented Dec 20, 2023

Oh, ta!
Yeah, I would never have found that -- thanks.

@rjsparks rjsparks merged commit 9f0a97c into ietf-tools:feat/clarity Dec 20, 2023
@larseggert larseggert deleted the fix-wbr branch December 21, 2023 07:05
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Dec 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants