Skip to content
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 alignment problems #1564

Closed
davinaleong opened this issue Sep 18, 2018 · 2 comments · Fixed by #1566
Closed

Command Line plugin alignment problems #1564

davinaleong opened this issue Sep 18, 2018 · 2 comments · Fixed by #1566

Comments

@davinaleong
Copy link

Hi, I've just downloaded PrismJS, using the command line plugin.

The original PrismJS works like a charm, but there are alignment issues when attempting to use the command line plugin. This is used in conjuction with other popular packages like Bootstrap 4 and Font Awesome.

Screenshot:
2018-09-19

Here's my code:

<link rel="stylesheet" href="./vendor/prismjs/themes/prism.css">
<link rel="stylesheet" href="./vendor/prismjs/plugins/command-line/prism-command-line.css">
<script src="./vendor/prismjs/prism.js"></script>
<script src="./vendor/prismjs/plugins/command-line/prism-command-line.min.js"></script>
<p>To view the pages as they are, simply run this command in your console/terminal:</p>
<pre class="command-line-prompt"><code class="language-bash">npm start</code></pre>
<p>And navigate to <code>http://localhost:3000/index.html</code> in your web browser.</p>

<p>To update the vendor packages, run this command in your terminal/console:</p>
<pre class="command-line-prompt"><code class="language-bash">gulp</code></pre>
@benfuu
Copy link

benfuu commented Sep 20, 2018

I think you are supposed to use the class command-line, not command-line-prompt.

@RunDevelopment
Copy link
Member

@davinaleong

@bennycooly Is correct. It is also stated in the how to use section of the command line plugin:

Add class command-line to your <pre>.

The command-line-prompt class is used internally by the command line plugin and it should not be possible to enable command lines via this class.
This is a bug.

mAAdhaTTah pushed a commit that referenced this issue Nov 28, 2018
Fixes #1564 where the plugin would wrongly detect `command-line-prompt`
causing the alignment issue.
ggrossetie pushed a commit to ggrossetie/prism that referenced this issue Mar 11, 2019
Fixes PrismJS#1564 where the plugin would wrongly detect `command-line-prompt`
causing the alignment issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants