-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Command-Line plugin skips end of code block #2795
Comments
This issue seems to be linked to Issue #1132. I was able to fix the examples above by adding 'display: block' to the 'pre[class*="language-"]' block in my prism.js file. |
The issue is most likely the spaces between the <pre class="command-line language-shell" data-output="2-3, 5-9, 11-21" data-user="www-data" data-host="ubuntu"><code>/usr/bin/script -qc /bin/bash /dev/null
/usr/bin/script -qc /bin/bash /dev/null
ls -lAh /var/www
ls -lAh /var/www
total 8.0K
drwxr-xr-x 4 www-data www-data 4.0K Mar 17 2020 Magic
drwxr-xr-x 2 root root 4.0K Dec 3 2019 html
ls -lAh /var/www/Magic
ls -lAh
total 44K
-rwx---r-x 1 www-data www-data 162 Oct 18 2019 .htaccess
drwxrwxr-x 6 www-data www-data 4.0K Jun 6 2019 assets
-rw-r--r-- 1 www-data www-data 881 Oct 16 2019 db.php5
drwxr-xr-x 4 www-data www-data 4.0K Apr 14 2020 images
-rw-rw-r-- 1 www-data www-data 4.5K Oct 22 2019 index.php
-rw-r--r-- 1 www-data www-data 5.5K Oct 22 2019 login.php
-rw-r--r-- 1 www-data www-data 72 Oct 18 2019 logout.php
-rw-r--r-- 1 www-data www-data 4.5K Oct 22 2019 upload.php
</code></pre>
I don't this being related. |
I investigated this a bit more and it seems like my initial guess was wrong. In fact, I cannot reproduce this issue at all. My new guess is that your custom theme somehow interferes with the Command line plugin. Please provide a simple example project that reproduces your issue. |
Closed because of inactivity. |
Information:
Does the latest version of Prism from the download page also have this issue?
Yes, I am using the latest version of Prism (1.23.0).
Description
While using the Command-Line plugin to create code blocks, I am experiencing an issue where some final output lines are not being displayed as a part of the command-line block. They are instead being displayed as what appears to be lines from a regular code block.
It appears that the issue might be due to the alignment of the prompt block, as you can see the alignment of the prompts and final line becoming further offset in the second example below. This tracks with my observation that there does not appear to be a definite line count threshold for triggering this issue, but that the issue is more pronounced in code blocks with higher line counts.
Example
Code Block HTML:
Unexpected Display:
HTML source for multiple input lines in single block:
Misaligned Display:
The text was updated successfully, but these errors were encountered: