Skip to content

Commit bf63ddd

Browse files
committedMay 22, 2020
remove clean function from CMD #574
clean was replacing \] by ] it should not modify the text because formatting is escaped user was not able to type \] it is importent when writing regexes in language REPL
1 parent 51916d0 commit bf63ddd

8 files changed

+36
-48
lines changed
 

‎README.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
__ / / // / // / _ / _/ // / / / _ / _/ / / \/ / _ \/ /
55
/ / / // / // / ___/ // // / / / ___/ // / / / / /\ / // / /__
66
\___/____ \\__/____/_/ \__ / /_/____/_//_/_/_/_/_/ \/\__\_\___/
7-
\/ /____/ version 2.16.0
7+
\/ /____/ version DEV
88
```
99
http://terminal.jcubic.pl
1010

11-
[![npm](https://img.shields.io/badge/npm-2.16.0-blue.svg)](https://www.npmjs.com/package/jquery.terminal)
12-
![bower](https://img.shields.io/badge/bower-2.16.0-yellow.svg)
13-
[![travis](https://travis-ci.org/jcubic/jquery.terminal.svg?branch=master&fa23a2b4a5c81fc911865d2a14be8613f9502f93)](https://travis-ci.org/jcubic/jquery.terminal)
14-
[![Coverage Status](https://coveralls.io/repos/github/jcubic/jquery.terminal/badge.svg?branch=master&456666fbade1b3a17080d5477566c268)](https://coveralls.io/github/jcubic/jquery.terminal?branch=master)
11+
[![npm](https://img.shields.io/badge/npm-DEV-blue.svg)](https://www.npmjs.com/package/jquery.terminal)
12+
![bower](https://img.shields.io/badge/bower-DEV-yellow.svg)
13+
[![travis](https://travis-ci.org/jcubic/jquery.terminal.svg?branch=devel&51916d0885a770ec18690f00bef868e96bd4f35e)](https://travis-ci.org/jcubic/jquery.terminal)
14+
[![Coverage Status](https://coveralls.io/repos/github/jcubic/jquery.terminal/badge.svg?branch=devel&80dfe77cfbd9ad1fe1173527ac83a164)](https://coveralls.io/github/jcubic/jquery.terminal?branch=devel)
1515
![downloads](https://img.shields.io/npm/dm/jquery.terminal.svg?style=flat)
1616
[![package quality](http://npm.packagequality.com/shield/jquery.terminal.svg)](http://packagequality.com/#?package=jquery.terminal)
1717
[![](https://data.jsdelivr.com/v1/package/npm/jquery.terminal/badge?style=rounded)](https://www.jsdelivr.com/package/npm/jquery.terminal)
@@ -77,20 +77,20 @@ Include jQuery library, you can use cdn from https://jquery.com/download/
7777
```
7878

7979

80-
Then include js/jquery.terminal-2.16.0.min.js and css/jquery.terminal-2.16.0.min.css
80+
Then include js/jquery.terminal-DEV.min.js and css/jquery.terminal-DEV.min.css
8181

8282
You can grab the files from CDN:
8383

8484
```html
85-
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/2.16.0/js/jquery.terminal.min.js"></script>
86-
<link href="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/2.16.0/css/jquery.terminal.min.css" rel="stylesheet"/>
85+
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/DEV/js/jquery.terminal.min.js"></script>
86+
<link href="https://cdnjs.cloudflare.com/ajax/libs/jquery.terminal/DEV/css/jquery.terminal.min.css" rel="stylesheet"/>
8787
```
8888

8989
or
9090

9191
```html
92-
<script src="https://cdn.jsdelivr.net/npm/jquery.terminal@2.16.0/js/jquery.terminal.min.js"></script>
93-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jquery.terminal@2.16.0/css/jquery.terminal.min.css">
92+
<script src="https://cdn.jsdelivr.net/npm/jquery.terminal@DEV/js/jquery.terminal.min.js"></script>
93+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jquery.terminal@DEV/css/jquery.terminal.min.css">
9494
```
9595

9696
If you always want latest version, you can get it from [unpkg](https://unpkg.com/) without specifying version,

‎__tests__/terminal.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2809,12 +2809,12 @@ describe('sub plugins', function() {
28092809
['foo\\nbar'],
28102810
[
28112811
'foo\\]bar',
2812-
'foo]bar'
2812+
'foo\\]bar'
28132813
],
28142814
['1111foo\\nbar1111'],
28152815
[
28162816
'1111foo111foo\\nbarr111baz\\]quux111',
2817-
'1111foo111foo\\nbarr111baz]quux111'
2817+
'1111foo111foo\\nbarr111baz\\]quux111'
28182818
]
28192819
];
28202820
tests.forEach(function(spec) {

‎js/jquery.terminal-2.16.0.js

+7-11
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ /
55
* / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__
66
* \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/
7-
* \/ /____/ version 2.16.0
7+
* \/ /____/ version DEV
88
*
99
* This file is part of jQuery Terminal. https://terminal.jcubic.pl
1010
*
@@ -41,7 +41,7 @@
4141
*
4242
* broken image by Sophia Bai from the Noun Project (CC-BY)
4343
*
44-
* Date: Sat, 16 May 2020 07:45:32 +0000
44+
* Date: Fri, 22 May 2020 15:38:17 +0000
4545
*/
4646
/* global define, Map */
4747
/* eslint-disable */
@@ -3035,10 +3035,6 @@
30353035
}
30363036
}
30373037
// ---------------------------------------------------------------------
3038-
function clean(string) {
3039-
return string.replace(/((?!\\).)\\(?:&#93;|])/g, '$1&#93;');
3040-
}
3041-
// ---------------------------------------------------------------------
30423038
// :: Command Line Methods
30433039
// ---------------------------------------------------------------------
30443040
$.extend(self, {
@@ -3100,7 +3096,7 @@
31003096
}
31013097
}
31023098
if (removed) {
3103-
command = clean(string);
3099+
command = string;
31043100
}
31053101
redraw();
31063102
fix_textarea();
@@ -3109,7 +3105,7 @@
31093105
},
31103106
set: function(string, stay, silent) {
31113107
if (string !== undefined) {
3112-
command = clean(string);
3108+
command = string;
31133109
if (!stay) {
31143110
self.position(bare_text(command).length);
31153111
}
@@ -3164,7 +3160,7 @@
31643160
string = bare_command.slice(0, position) +
31653161
string + bare_command.slice(position);
31663162
}
3167-
command = clean(string);
3163+
command = string;
31683164
if (!stay) {
31693165
self.position(len, true, true);
31703166
}
@@ -4355,8 +4351,8 @@
43554351
}
43564352
// -------------------------------------------------------------------------
43574353
$.terminal = {
4358-
version: '2.16.0',
4359-
date: 'Sat, 16 May 2020 07:45:32 +0000',
4354+
version: 'DEV',
4355+
date: 'Fri, 22 May 2020 15:38:17 +0000',
43604356
// colors from https://www.w3.org/wiki/CSS/Properties/color/keywords
43614357
color_names: [
43624358
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',

‎js/jquery.terminal-2.16.0.min.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎js/jquery.terminal-src.js

+3-7
Original file line numberDiff line numberDiff line change
@@ -3035,10 +3035,6 @@
30353035
}
30363036
}
30373037
// ---------------------------------------------------------------------
3038-
function clean(string) {
3039-
return string.replace(/((?!\\).)\\(?:&#93;|])/g, '$1&#93;');
3040-
}
3041-
// ---------------------------------------------------------------------
30423038
// :: Command Line Methods
30433039
// ---------------------------------------------------------------------
30443040
$.extend(self, {
@@ -3100,7 +3096,7 @@
31003096
}
31013097
}
31023098
if (removed) {
3103-
command = clean(string);
3099+
command = string;
31043100
}
31053101
redraw();
31063102
fix_textarea();
@@ -3109,7 +3105,7 @@
31093105
},
31103106
set: function(string, stay, silent) {
31113107
if (string !== undefined) {
3112-
command = clean(string);
3108+
command = string;
31133109
if (!stay) {
31143110
self.position(bare_text(command).length);
31153111
}
@@ -3164,7 +3160,7 @@
31643160
string = bare_command.slice(0, position) +
31653161
string + bare_command.slice(position);
31663162
}
3167-
command = clean(string);
3163+
command = string;
31683164
if (!stay) {
31693165
self.position(len, true, true);
31703166
}

‎js/jquery.terminal.js

+7-11
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ /
55
* / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__
66
* \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/
7-
* \/ /____/ version 2.16.0
7+
* \/ /____/ version DEV
88
*
99
* This file is part of jQuery Terminal. https://terminal.jcubic.pl
1010
*
@@ -41,7 +41,7 @@
4141
*
4242
* broken image by Sophia Bai from the Noun Project (CC-BY)
4343
*
44-
* Date: Sat, 16 May 2020 07:45:32 +0000
44+
* Date: Fri, 22 May 2020 15:38:17 +0000
4545
*/
4646
/* global define, Map */
4747
/* eslint-disable */
@@ -3035,10 +3035,6 @@
30353035
}
30363036
}
30373037
// ---------------------------------------------------------------------
3038-
function clean(string) {
3039-
return string.replace(/((?!\\).)\\(?:&#93;|])/g, '$1&#93;');
3040-
}
3041-
// ---------------------------------------------------------------------
30423038
// :: Command Line Methods
30433039
// ---------------------------------------------------------------------
30443040
$.extend(self, {
@@ -3100,7 +3096,7 @@
31003096
}
31013097
}
31023098
if (removed) {
3103-
command = clean(string);
3099+
command = string;
31043100
}
31053101
redraw();
31063102
fix_textarea();
@@ -3109,7 +3105,7 @@
31093105
},
31103106
set: function(string, stay, silent) {
31113107
if (string !== undefined) {
3112-
command = clean(string);
3108+
command = string;
31133109
if (!stay) {
31143110
self.position(bare_text(command).length);
31153111
}
@@ -3164,7 +3160,7 @@
31643160
string = bare_command.slice(0, position) +
31653161
string + bare_command.slice(position);
31663162
}
3167-
command = clean(string);
3163+
command = string;
31683164
if (!stay) {
31693165
self.position(len, true, true);
31703166
}
@@ -4355,8 +4351,8 @@
43554351
}
43564352
// -------------------------------------------------------------------------
43574353
$.terminal = {
4358-
version: '2.16.0',
4359-
date: 'Sat, 16 May 2020 07:45:32 +0000',
4354+
version: 'DEV',
4355+
date: 'Fri, 22 May 2020 15:38:17 +0000',
43604356
// colors from https://www.w3.org/wiki/CSS/Properties/color/keywords
43614357
color_names: [
43624358
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',

‎js/jquery.terminal.min.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎js/jquery.terminal.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)