Try filtering output lines
This commit is contained in:
parent
ab7d5e9134
commit
3c156eaede
@ -68,14 +68,14 @@ First, the USB device you want to check has to be selected
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
lsusb
|
lsusb
|
||||||
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
|
(out) Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
|
||||||
Bus 003 Device 003: ID 0c45:652f Microdia Backlit Gaming Keyboard
|
(out) Bus 003 Device 003: ID 0c45:652f Microdia Backlit Gaming Keyboard
|
||||||
Bus 003 Device 002: ID 046d:c084 Logitech, Inc. G203 Gaming Mouse
|
(out) Bus 003 Device 002: ID 046d:c084 Logitech, Inc. G203 Gaming Mouse
|
||||||
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
|
(out) Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
|
||||||
Bus 002 Device 002: ID 0781:55a3 SanDisk Corp. SanDisk 3.2Gen1
|
(out) Bus 002 Device 002: ID 0781:55a3 SanDisk Corp. SanDisk 3.2Gen1
|
||||||
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
|
(out) Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
|
||||||
Bus 001 Device 002: ID 2972:0047 FiiO Electronics Technology FiiO BTR5
|
(out) Bus 001 Device 002: ID 2972:0047 FiiO Electronics Technology FiiO BTR5
|
||||||
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
|
(out) Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
|
||||||
```
|
```
|
||||||
|
|
||||||
[/shuser]
|
[/shuser]
|
||||||
@ -86,7 +86,7 @@ Now, using the ID, the USB class used can be determined
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
lsusb -d 0781:55a3 -v | grep bcdUSB
|
lsusb -d 0781:55a3 -v | grep bcdUSB
|
||||||
bcdUSB 3.20
|
(out) bcdUSB 3.20
|
||||||
```
|
```
|
||||||
|
|
||||||
[/shuser]
|
[/shuser]
|
||||||
|
@ -10,7 +10,7 @@ class Prismjsshroot extends Shortcode
|
|||||||
$this->shortcode->getRawHandlers()->add('shroot', function(ShortcodeInterface $sc) {
|
$this->shortcode->getRawHandlers()->add('shroot', function(ShortcodeInterface $sc) {
|
||||||
$content = preg_replace('/^```.*(\n)?$/m', '', $sc->getContent());
|
$content = preg_replace('/^```.*(\n)?$/m', '', $sc->getContent());
|
||||||
$content = trim($content);
|
$content = trim($content);
|
||||||
return '<pre class="command-line language-sh" data-prompt="#" data-continuation-str="\" tabindex="0"><code class="language-sh">'.$content.'</code></pre>';
|
return '<pre class="command-line language-sh" data-prompt="#" data-continuation-str="\" data-filter-output="(out)" tabindex="0"><code class="language-sh">'.$content.'</code></pre>';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ class Prismjsshuser extends Shortcode
|
|||||||
$this->shortcode->getRawHandlers()->add('shuser', function(ShortcodeInterface $sc) {
|
$this->shortcode->getRawHandlers()->add('shuser', function(ShortcodeInterface $sc) {
|
||||||
$content = preg_replace('/^```.*(\n)?$/m', '', $sc->getContent());
|
$content = preg_replace('/^```.*(\n)?$/m', '', $sc->getContent());
|
||||||
$content = trim($content);
|
$content = trim($content);
|
||||||
return '<pre class="command-line language-sh" data-prompt="$" data-continuation-str="\" tabindex="0"><code class="language-sh">'.$content.'</code></pre>';
|
return '<pre class="command-line language-sh" data-prompt="$" data-continuation-str="\" data-filter-output="(out)" tabindex="0"><code class="language-sh">'.$content.'</code></pre>';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user