Skip to content

Commit 5ee8566

Browse files
committed
Fix empty new line with empty formatting
1 parent 385ede5 commit 5ee8566

8 files changed

+174
-161
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
VERSION=0.4.21
1+
VERSION=0.4.22
22
JSC=java -jar bin/closure.bin/compiler.jar --js
33
SED=sed
44
CP=cp

README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
__ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ /
44
/ / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__
55
\___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/
6-
\/ /____/ version 0.4.21
6+
\/ /____/ version 0.4.22
77

88

99
http://terminal.jcubic.pl

css/jquery.terminal.css

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@
2020
margin: 0;
2121
height: 1.3em;
2222
}
23-
.terminal .terminal-output div {
23+
.terminal .terminal-output div div, .terminal .prompt {
2424
display: block;
25+
line-height: 9px;
26+
height: 14px;
2527
}
2628
.terminal {
2729
font-family: FreeMono, monospace;
@@ -40,11 +42,12 @@
4042
background-color: #aaa;
4143
color: #000;
4244
}
43-
.terminal div::-moz-selection, .terminal span::-moz-selection {
45+
.terminal .terminal-output div div::-moz-selection, .terminal .terminal-output div span::-moz-selection {
4446
background-color: #aaa;
4547
color: #000;
4648
}
47-
.terminal div::selection, .terminal span::selection {
49+
.terminal .terminal-output div div::selection, .terminal .terminal-output div span::selection,
50+
.terminal .cmd > span::selection, .terminal .prompt span::selection {
4851
background-color: #aaa;
4952
color: #000;
5053
}

js/jquery.terminal-0.4.21.min.js

Lines changed: 0 additions & 85 deletions
This file was deleted.

js/jquery.terminal-0.4.21.js renamed to js/jquery.terminal-0.4.22.js

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*| __ / // // // // // _ // _// // / / // _ // _// // // \/ // _ \/ /
55
*| / / // // // // // ___// / / // / / // ___// / / / / // // /\ // // / /__
66
*| \___//____ \\___//____//_/ _\_ / /_//____//_/ /_/ /_//_//_/ /_/ \__\_\___/
7-
*| \/ /____/ version 0.4.21
7+
*| \/ /____/ version 0.4.22
88
* http://terminal.jcubic.pl
99
*
1010
* Licensed under GNU LGPL Version 3 license
@@ -22,7 +22,7 @@
2222
* Copyright 2007-2012 Steven Levithan <stevenlevithan.com>
2323
* Available under the MIT License
2424
*
25-
* Date: Thu, 27 Sep 2012 14:21:53 +0000
25+
* Date: Wed, 07 Nov 2012 05:59:12 +0000
2626
*/
2727

2828
/*
@@ -443,7 +443,7 @@
443443
// -----------------------------------------------------------------------
444444

445445
function skipFormattingCount(string) {
446-
return $.terminal.strip(string).length;
446+
return $('<div>' + $.terminal.strip(string) + '</div>').text().length;
447447
}
448448

449449
// -----------------------------------------------------------------------
@@ -917,10 +917,12 @@
917917
return function() {
918918
if (typeof prompt === 'string') {
919919
prompt_len = skipFormattingCount(prompt);
920+
console.log(prompt_len);
920921
prompt_node.html($.terminal.format(prompt));
921922
} else {
922923
prompt(function(string) {
923924
prompt_len = skipFormattingCount(string);
925+
console.log(prompt_len);
924926
prompt_node.html($.terminal.format(string));
925927
});
926928
}
@@ -1487,7 +1489,8 @@
14871489
link = link.replace(/\.$/, '');
14881490
return '<a target="_blank" href="' + link + '">' + link + '</a>' +
14891491
(comma ? '.' : '');
1490-
}).replace(email_regex, '<a href="mailto:$1">$1</a>');
1492+
}).replace(email_regex, '<a href="mailto:$1">$1</a>').
1493+
replace(/<span><br\/?><\/span>/g, '<br/>');
14911494
} else {
14921495
return '';
14931496
}
@@ -1654,7 +1657,7 @@
16541657
// -----------------------------------------------------------------------
16551658
// :: TERMINAL PLUGIN CODE
16561659
// -----------------------------------------------------------------------
1657-
var version = '0.4.21';
1660+
var version = '0.4.22';
16581661
var copyright = 'Copyright (c) 2011-2012 Jakub Jankiewicz <http://jcubic.pl>';
16591662
var version_string = 'version ' + version;
16601663
//regex is for placing version string aligned to the right
@@ -1897,6 +1900,9 @@
18971900
}
18981901
return self;
18991902
},
1903+
commands: function() {
1904+
return interpreters.top().eval;
1905+
},
19001906
greetings: function() {
19011907
show_greetings();
19021908
return self;
@@ -2194,15 +2200,14 @@
21942200
prepare_top_interpreter();
21952201
if (typeof current.onExit === 'function') {
21962202
try {
2197-
settings.onExit(self);
2203+
current.onExit(self);
21982204
} catch (e) {
21992205
display_exception(e, 'onExit');
22002206
throw e;
22012207
}
22022208
}
22032209
}
22042210
return self;
2205-
22062211
}
22072212
}, function(_, fun) {
22082213
// wrap all functions and display execptions

0 commit comments

Comments
 (0)