-
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
bug(plugin): command-line data-filter-out not working #1706
Comments
The leading spaces are the problem (I think). Because of them, you don't have any lines with the prefix Also, please don't indent your code. For |
Hey @RunDevelopment, I have tried this with no success: <tr>
<td>
<pre class="command-line language-bash" data-filter-output="(out)" data-user="user" data-host="remotehost">
<code>
pwd
(out)/usr/home/user/bin
ls -la
(out)total 2
(out)drwxr-xr-x 2 user group 11 Jan 10 16:48 .
(out)drwxr--r-x 45 user group 92 Feb 14 11:10 ..
(out)-rwxr-xr-x 1 user group 444 Aug 25 2013 backup
(out)-rwxr-xr-x 1 user group 642 Jan 17 14:42 deploy
</code>
</pre>
</td>
<td> renders to: <code class=" language-bash"><span class="command-line-prompt"><span data-user="user" data-host="remotehost"></span><span data-user="user" data-host="remotehost"></span><span></span><span data-user="user" data-host="remotehost"></span><span></span><span></span><span></span><span></span><span></span><span data-user="user" data-host="remotehost"></span></span>
pwd
ls -la
</code> I have also tried to just activate the core and command-line again. |
I have created a fiddle: https://jsfiddle.net/muuvmuuv/tckqsa1j/ |
I have found the issue, I had not imported the required languages... 😆 sorry, so obvious |
It should work even without the grammar being imported, so I still think that this needs fixing. The first version of my fix can be found here. I will make a PR for this. |
Fixes #1706 (also includes a demo). The problem was that the `insert-before` hook was not called if `grammar` is undefined. This also fixes that `callback` was not called in that case and that `env` of the `complete` hook did not have a `highlightedCode` property. All other hooks are unchanged. The `insert-before` hook is only used by the Command line plugin, so there should be no other side effects.
I'm trying to get this to work:
I'm loading the core and plugins like this:
and prism is rendering it to this:
I have tried disabling all plugins but still not the result I expected.
The text was updated successfully, but these errors were encountered: