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

Wrong number of character when text have brackets #772

Closed
jcubic opened this issue Apr 9, 2022 · 0 comments
Closed

Wrong number of character when text have brackets #772

jcubic opened this issue Apr 9, 2022 · 0 comments
Labels
Bug resolved if issue is resolved, it will be open until merge with master
Milestone

Comments

@jcubic
Copy link
Owner

jcubic commented Apr 9, 2022

Issue summary

When text have brackets it count characters in wrong way

Expected behavior

The number of characters per line is the same with and without brackets

Actual behavior

Number is off by number of brackets

Steps to reproduce

  1. Use the output of jargon geek command from 404 Error page but with break words
  2. or Execute:
$.terminal.active().echo(`1. [mainstream slang] Pejorative applied to anyone with an above-average IQ and few gifts at small talk and ordinary social rituals. 2. [jargon] Term of praise applied (in conscious ironic reference to sense 1) to someone who knows what's really important and interesting and doesn't care to be distracted by trivial chatter and silly status games. Compare [[bu;#fff;;jargon]geek].The word itself appears to derive from the lines [[i;;]And then, just to show them, I'll sail to Ka-Troo / And Bring Back an It-Kutch, a Preep and a Proo, / A Nerkle, a Nerd, and a Seersucker, too!] in the Dr. Seuss book If I Ran the Zoo (1950). (The spellings ‘nurd’ and ‘gnurd’ also used to be current at MIT, where ‘nurd’ is reported from as far back as 1957; however, [[bu;#fff;;jargon]knurd] appears to have a separate etymology.) How it developed its mainstream meaning is unclear, but sense 1 seems to have entered mass culture in the early 1970s (there are reports that in the mid-1960s it meant roughly [[i;;]annoying misfit] without the connotation of intelligence.Hackers developed sense 2 in self-defense perhaps ten years later, and some actually wear [[i;;]Nerd Pride] buttons, only half as a joke. At MIT one can find not only buttons but (what else?) pocket protectors bearing the slogan and the MIT seal.`)

Browser and OS

NA

Additional notes

This happens only when text has formatting and between formatting, there is text with brackets. That's why it was not caught before.

@jcubic jcubic added the Bug label Apr 9, 2022
@jcubic jcubic added this to the 2.33.0 milestone Apr 9, 2022
jcubic added a commit that referenced this issue May 3, 2022
@jcubic jcubic added the resolved if issue is resolved, it will be open until merge with master label May 3, 2022
@jcubic jcubic closed this as completed May 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug resolved if issue is resolved, it will be open until merge with master
Projects
None yet
Development

No branches or pull requests

1 participant