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

Closing bracket is not rendered #597

Closed
jcubic opened this issue Jul 4, 2020 · 2 comments
Closed

Closing bracket is not rendered #597

jcubic opened this issue Jul 4, 2020 · 2 comments
Labels
Bug resolved if issue is resolved, it will be open until merge with master

Comments

@jcubic
Copy link
Owner

jcubic commented Jul 4, 2020

Issue summary

If you echo closing bracket + newline just after, the bracket is swallowed

Expected behavior

The bracket is visible

Actual behavior

The bracket is not visible

Steps to reproduce

  1. Open any demo
  2. call $.terminal.active().echo('usage: github [options]\nxxx');

You can also, check 404 page https://terminal.jcubic.pl/404 and type github.

@jcubic jcubic added the Bug label Jul 4, 2020
@jcubic
Copy link
Owner Author

jcubic commented Jul 4, 2020

It happen in the string have newline in any place even before the bracket. echo('\nusage: github [options]');

@jcubic
Copy link
Owner Author

jcubic commented Jul 4, 2020

The problem was iterate_formatting function used by split_equal that didn't checked if last bracket was part of formatting.

jcubic added a commit that referenced this issue Jul 4, 2020
The problem was wrong last bracket detection that didn't tested if it's formatting
@jcubic jcubic added the resolved if issue is resolved, it will be open until merge with master label Jul 4, 2020
@jcubic jcubic closed this as completed Jul 4, 2020
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