Skip to content

Commit

Permalink
fix echo raw interfering with echo without newline #695
Browse files Browse the repository at this point in the history
The problem was that when you echo raw html with div tag
that div was affected by the code for echo without newline
  • Loading branch information
jcubic committed Sep 21, 2021
1 parent b37816f commit 67c37fd
Show file tree
Hide file tree
Showing 15 changed files with 72 additions and 59 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,7 @@
## 2.29.3
### Bugfix
* fix echo raw interfering with echo without newline [#695](https://github.com/jcubic/jquery.terminal/issues/695)

## 2.29.2
### Bugfix
* fix linkify of urls (better url detection)
Expand Down
22 changes: 11 additions & 11 deletions README.md
Expand Up @@ -4,15 +4,15 @@
__ / / // / // / _ / _/ // / / / _ / _/ / / \/ / _ \/ /
/ / / // / // / ___/ // // / / / ___/ // / / / / /\ / // / /__
\___/____ \\__/____/_/ \__ / /_/____/_//_/_/_/_/_/ \/\__\_\___/
\/ /____/ version 2.29.2
\/ /____/ version DEV
```

[JavaScript Library for Web Based Terminal Emulators](https://terminal.jcubic.pl)

[![npm](https://img.shields.io/badge/npm-2.29.2-blue.svg)](https://www.npmjs.com/package/jquery.terminal)
![bower](https://img.shields.io/badge/bower-2.29.2-yellow.svg)
[![travis](https://travis-ci.org/jcubic/jquery.terminal.svg?branch=master&bb91ffc4b4398af12b230d331aa1ae42d49f03d7)](https://travis-ci.org/jcubic/jquery.terminal)
[![Coverage Status](https://coveralls.io/repos/github/jcubic/jquery.terminal/badge.svg?branch=master&adf0be0159c06fd2998bde8bcba30c02)](https://coveralls.io/github/jcubic/jquery.terminal?branch=master)
[![npm](https://img.shields.io/badge/npm-DEV-blue.svg)](https://www.npmjs.com/package/jquery.terminal)
![bower](https://img.shields.io/badge/bower-DEV-yellow.svg)
[![travis](https://travis-ci.org/jcubic/jquery.terminal.svg?branch=devel&b37816f3ae722b800b69b6efcff7723ecd106922)](https://travis-ci.org/jcubic/jquery.terminal)
[![Coverage Status](https://coveralls.io/repos/github/jcubic/jquery.terminal/badge.svg?branch=devel&adf0be0159c06fd2998bde8bcba30c02)](https://coveralls.io/github/jcubic/jquery.terminal?branch=devel)
![downloads](https://img.shields.io/npm/dm/jquery.terminal.svg?style=flat)
[![Paid Support](https://data.jsdelivr.com/v1/package/npm/jquery.terminal/badge?style=rounded)](https://www.jsdelivr.com/package/npm/jquery.terminal)
[![](https://img.shields.io/badge/paid-support-354465.svg)](https://support.jcubic.pl/)
Expand Down Expand Up @@ -92,7 +92,7 @@ You can test current version at this URL:

or if it doesn't use latest version (because of jsDelivr cache) you can force it with this URL:

* [https://jcubic.github.io/jquery.terminal/?ver=2.29.2](https://jcubic.github.io/jquery.terminal/?ver=2.29.2)
* [https://jcubic.github.io/jquery.terminal/?ver=DEV](https://jcubic.github.io/jquery.terminal/?ver=DEV)

And development version using:

Expand All @@ -110,20 +110,20 @@ Include jQuery library, you can use cdn from https://jquery.com/download/

```

Then include js/jquery.terminal-2.29.2.min.js and css/jquery.terminal-2.29.2.min.css
Then include js/jquery.terminal-DEV.min.js and css/jquery.terminal-DEV.min.css

You can grab the files from CDN:

```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/2.29.2/js/jquery.terminal.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/2.29.2/css/jquery.terminal.min.css" rel="stylesheet"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/DEV/js/jquery.terminal.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/DEV/css/jquery.terminal.min.css" rel="stylesheet"/>
```

or

```html
<script src="https://cdn.jsdelivr.net/npm/jquery.terminal@2.29.2/js/jquery.terminal.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jquery.terminal@2.29.2/css/jquery.terminal.min.css">
<script src="https://cdn.jsdelivr.net/npm/jquery.terminal@DEV/js/jquery.terminal.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jquery.terminal@DEV/css/jquery.terminal.min.css">
```

If you always want latest version, you can get it from [unpkg](https://unpkg.com/) without specifying version,
Expand Down
2 changes: 1 addition & 1 deletion css/emoji.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions css/jquery.terminal-2.29.2.css
Expand Up @@ -4,15 +4,15 @@
* __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ /
* / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__
* \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/
* \/ /____/ version 2.29.2
* \/ /____/ version DEV
* http://terminal.jcubic.pl
*
* This file is part of jQuery Terminal.
*
* Copyright (c) 2011-2021 Jakub Jankiewicz <https://jcubic.pl/me>
* Released under the MIT license
*
* Date: Sun, 12 Sep 2021 17:15:47 +0000
* Date: Tue, 21 Sep 2021 15:37:39 +0000
*/

.terminal .terminal-output .format, .cmd .format,
Expand Down Expand Up @@ -222,7 +222,7 @@ body.full-screen-terminal .terminal {
.cmd {
font-size: 12px;
}
.terminal-output div div::before {
.terminal-output > div:not(.raw) div::before {
content: '\0200B';
width: 0;
float: left;
Expand Down
6 changes: 3 additions & 3 deletions css/jquery.terminal-2.29.2.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/jquery.terminal-src.css
Expand Up @@ -222,7 +222,7 @@ body.full-screen-terminal .terminal {
.cmd {
font-size: 12px;
}
.terminal-output div div::before {
.terminal-output > div:not(.raw) div::before {
content: '\0200B';
width: 0;
float: left;
Expand Down
6 changes: 3 additions & 3 deletions css/jquery.terminal.css
Expand Up @@ -4,15 +4,15 @@
* __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ /
* / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__
* \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/
* \/ /____/ version 2.29.2
* \/ /____/ version DEV
* http://terminal.jcubic.pl
*
* This file is part of jQuery Terminal.
*
* Copyright (c) 2011-2021 Jakub Jankiewicz <https://jcubic.pl/me>
* Released under the MIT license
*
* Date: Sun, 12 Sep 2021 17:15:47 +0000
* Date: Tue, 21 Sep 2021 15:37:39 +0000
*/

.terminal .terminal-output .format, .cmd .format,
Expand Down Expand Up @@ -222,7 +222,7 @@ body.full-screen-terminal .terminal {
.cmd {
font-size: 12px;
}
.terminal-output div div::before {
.terminal-output > div:not(.raw) div::before {
content: '\0200B';
width: 0;
float: left;
Expand Down
6 changes: 3 additions & 3 deletions css/jquery.terminal.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/jquery.terminal.min.css.map

Large diffs are not rendered by default.

23 changes: 13 additions & 10 deletions js/jquery.terminal-2.29.2.js
Expand Up @@ -4,7 +4,7 @@
* __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ /
* / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__
* \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/
* \/ /____/ version 2.29.2
* \/ /____/ version DEV
*
* This file is part of jQuery Terminal. https://terminal.jcubic.pl
*
Expand Down Expand Up @@ -41,7 +41,7 @@
*
* broken image by Sophia Bai from the Noun Project (CC-BY)
*
* Date: Sun, 12 Sep 2021 17:15:46 +0000
* Date: Tue, 21 Sep 2021 15:37:35 +0000
*/
/* global define, Map */
/* eslint-disable */
Expand Down Expand Up @@ -5064,8 +5064,8 @@
}
// -------------------------------------------------------------------------
$.terminal = {
version: '2.29.2',
date: 'Sun, 12 Sep 2021 17:15:46 +0000',
version: 'DEV',
date: 'Tue, 21 Sep 2021 15:37:35 +0000',
// colors from https://www.w3.org/wiki/CSS/Properties/color/keywords
color_names: [
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
Expand Down Expand Up @@ -9889,12 +9889,15 @@
cmd_prompt.css('margin-left', 0);
cmd_outer.css('top', 0);
command_line.__set_prompt_margin(0);
last_row = self.find('.terminal-output div:last-child ' +
'div:last-child');
last_row.css({
width: '100%',
display: ''
});
last_row = self.find('.terminal-output div:last-child' +
' div:last-child');
// check if the div is parital fix #695
if (last_row.css('display') === 'inline-block') {
last_row.css({
width: '100%',
display: ''
});
}
} else {
last_row = partial.children().last();
// Remove width='100%' for two reasons:
Expand Down
6 changes: 3 additions & 3 deletions js/jquery.terminal-2.29.2.min.js

Large diffs are not rendered by default.

15 changes: 9 additions & 6 deletions js/jquery.terminal-src.js
Expand Up @@ -9889,12 +9889,15 @@
cmd_prompt.css('margin-left', 0);
cmd_outer.css('top', 0);
command_line.__set_prompt_margin(0);
last_row = self.find('.terminal-output div:last-child ' +
'div:last-child');
last_row.css({
width: '100%',
display: ''
});
last_row = self.find('.terminal-output div:last-child' +
' div:last-child');
// check if the div is parital fix #695
if (last_row.css('display') === 'inline-block') {
last_row.css({
width: '100%',
display: ''
});
}
} else {
last_row = partial.children().last();
// Remove width='100%' for two reasons:
Expand Down
23 changes: 13 additions & 10 deletions js/jquery.terminal.js
Expand Up @@ -4,7 +4,7 @@
* __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ /
* / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__
* \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/
* \/ /____/ version 2.29.2
* \/ /____/ version DEV
*
* This file is part of jQuery Terminal. https://terminal.jcubic.pl
*
Expand Down Expand Up @@ -41,7 +41,7 @@
*
* broken image by Sophia Bai from the Noun Project (CC-BY)
*
* Date: Sun, 12 Sep 2021 17:15:46 +0000
* Date: Tue, 21 Sep 2021 15:37:35 +0000
*/
/* global define, Map */
/* eslint-disable */
Expand Down Expand Up @@ -5064,8 +5064,8 @@
}
// -------------------------------------------------------------------------
$.terminal = {
version: '2.29.2',
date: 'Sun, 12 Sep 2021 17:15:46 +0000',
version: 'DEV',
date: 'Tue, 21 Sep 2021 15:37:35 +0000',
// colors from https://www.w3.org/wiki/CSS/Properties/color/keywords
color_names: [
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
Expand Down Expand Up @@ -9889,12 +9889,15 @@
cmd_prompt.css('margin-left', 0);
cmd_outer.css('top', 0);
command_line.__set_prompt_margin(0);
last_row = self.find('.terminal-output div:last-child ' +
'div:last-child');
last_row.css({
width: '100%',
display: ''
});
last_row = self.find('.terminal-output div:last-child' +
' div:last-child');
// check if the div is parital fix #695
if (last_row.css('display') === 'inline-block') {
last_row.css({
width: '100%',
display: ''
});
}
} else {
last_row = partial.children().last();
// Remove width='100%' for two reasons:
Expand Down
6 changes: 3 additions & 3 deletions js/jquery.terminal.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/jquery.terminal.min.js.map

Large diffs are not rendered by default.

0 comments on commit 67c37fd

Please sign in to comment.