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

Export Import discards blank lines #1007

Open
ordo-n opened this issue Jan 22, 2025 · 4 comments
Open

Export Import discards blank lines #1007

ordo-n opened this issue Jan 22, 2025 · 4 comments
Labels
Bug resolved if issue is resolved, it will be open until merge with master

Comments

@ordo-n
Copy link

ordo-n commented Jan 22, 2025

Issue summary

When exporting and importing the terminal view blank lines are discarded

Expected behavior

Blank lines should be preserved

Steps to reproduce

    var term = $.terminal.active();
    term.echo('1');
    term.echo('');
    term.echo('2');
    term.echo('');
    term.echo('3');
    term.echo('');
    term.echo('4');
    term.echo('');
    term.echo('5');
    term.echo('');
    term.import_view(term.export_view());

Browser and OS

Chrome, Edge

@ordo-n ordo-n added the Bug label Jan 22, 2025
@ordo-n ordo-n changed the title Export Import discards new lines Export Import discards blank lines Jan 22, 2025
jcubic added a commit that referenced this issue Jan 22, 2025
@jcubic
Copy link
Owner

jcubic commented Jan 22, 2025

Thanks for the report. The library was explicitly removing lines that were falsy.

It should be fixed on devel branch.

@jcubic jcubic added the resolved if issue is resolved, it will be open until merge with master label Jan 22, 2025
@ordo-n
Copy link
Author

ordo-n commented Jan 22, 2025

I'm using:

https://cdn.jsdelivr.net/gh/jcubic/jquery.terminal@devel/js/jquery.terminal.js

It doesnt appear to have been updated yet does it usually take long?

@jcubic
Copy link
Owner

jcubic commented Jan 23, 2025

The jsDelivr CDN files are cached. You need to purge the CDN for it to be updated.

I've purged the changes. But it doesn't always work. The best way is to use commit hash instead of branch, this way you will be 100% sure you get the right version.

@ordo-n
Copy link
Author

ordo-n commented Jan 23, 2025

The change has come through. All fixed. Thanks for the swift resolution.:)

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

2 participants