Skip to content

Commit 9be6198

Browse files
committed
fix: Italic, bold, etc. functions properly reset state
1 parent 0e90392 commit 9be6198

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/src/public/bash-term.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ term.bold() {
313313
unset -v REPLY
314314
local text="$1"
315315

316-
printf -v REPLY '\e[1m%s\e0m' "$text"
316+
printf -v REPLY '\e[1m%s\e[0m' "$text"
317317
}
318318

319319
# @description Construct italic
@@ -322,7 +322,7 @@ term.italic() {
322322
unset -v REPLY
323323
local text="$1"
324324

325-
printf -v REPLY '\e[3m%s\e0m' "$text"
325+
printf -v REPLY '\e[3m%s\e[0m' "$text"
326326
}
327327

328328
# @description Construct underline
@@ -331,7 +331,7 @@ term.underline() {
331331
unset -v REPLY
332332
local text="$1"
333333

334-
printf -v REPLY '\e[4m%s\e0m' "$text"
334+
printf -v REPLY '\e[4m%s\e[0m' "$text"
335335
}
336336

337337
# @description Construct strikethrough
@@ -340,6 +340,6 @@ term.strikethrough() {
340340
unset -v REPLY
341341
local text="$1"
342342

343-
printf -v REPLY '\e[9m%s\e0m' "$text"
343+
printf -v REPLY '\e[9m%s\e[0m' "$text"
344344
}
345345

0 commit comments

Comments
 (0)