Skip to content

Commit 7d88ba7

Browse files
author
rakeshAlgo
committed
Fix $ remove issues from console
1 parent b123a87 commit 7d88ba7

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

preview-src/index.adoc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,21 @@ $ curl -X POST -v -d 'updateInterval=7000&updateMinChanges=7000' \
437437
'http://Administrator:Password@192.168.0.72:8091/settings/viewUpdateDaemon'
438438
----
439439

440+
[source,bash]
441+
----
442+
libcouchbase-dbg - library for the Couchbase protocol, debug symbols libcouchbase-dev - library for the Couchbase protocol, development files libcouchbase3 - library for the Couchbase protocol, core files libcouchbase3-libev - library for the Couchbase protocol (libev backend) libcouchbase3-libevent - library for the Couchbase protocol (libevent backend) libcouchbase3-tools - library for the Couchbase protocol
443+
----
444+
445+
[source,console]
446+
----
447+
sudo apt-get install libcouchbase3 libcouchbase-dev libcouchbase3-tools libcouchbase-dbg libcouchbase3-libev libcouchbase3-libevent
448+
----
449+
450+
[source,console]
451+
----
452+
$ sudo apt-get update $ sudo apt-cache search libcouchbase
453+
----
454+
440455
Partial-set development views are not automatically rebuilt.
441456

442457
=== Couchbase Kafka Connector 3.2.3 GA (2018-02-20)

src/js/07-copy-to-clipboard.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@
2828
copyButton.addEventListener('click', function (e) {
2929
// NOTE: ignore event on pseudo-element
3030
if (e.currentTarget === e.target) return
31-
// for console text
32-
if (codeBlock.dataset.lang === 'console') {
33-
var bashText = codeBlock.innerText
34-
// remove $ from text
35-
navigator.clipboard.writeText(bashText.slice(2)).then(
31+
var bashText = codeBlock.innerText
32+
// bashText.slice(2)
33+
// remove '$' from copy to code functionality in code block console
34+
var spliceData = bashText.split('$').join('')
35+
if (codeBlock.dataset.lang === 'console' || bashText.includes('$')) {
36+
navigator.clipboard.writeText(spliceData).then(
3637
function () {
3738
/* Chrome doesn't seem to blur automatically,
3839
leaving the button in a focused state. */

0 commit comments

Comments
 (0)