You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bug occurs when Prism is loaded from a CDN or in a manner similar to a CDN. It does not occur when using a packaged bundle from the website.
When the Autoloader and Command Line plugins are both loaded, the Autoloader plugin causes Prism to scan a document for code boxes twice. When using the Command Line plugin with the data-filter-output="(out)" or the data-filter-continuation="(con)" attribute, the plugin outputs the expected result on the first pass - removing the prefixes and setting the lines to outputs. When Autoloader causes it to run a second time (once the grammar loads, I would assume), there are no longer any prefix on the code block lines, causing the Command Line plugin to think that every line is an input line.
Example
GitLab - contains example .html files and download copy of the Autoloader and Command Line plugins for testing. The files ending in from_git have a copy and pasted version of this file that I used to try and debug what was happening.
Information:
Description
This bug occurs when Prism is loaded from a CDN or in a manner similar to a CDN. It does not occur when using a packaged bundle from the website.
When the Autoloader and Command Line plugins are both loaded, the Autoloader plugin causes Prism to scan a document for code boxes twice. When using the Command Line plugin with the
data-filter-output="(out)"
or thedata-filter-continuation="(con)"
attribute, the plugin outputs the expected result on the first pass - removing the prefixes and setting the lines to outputs. When Autoloader causes it to run a second time (once the grammar loads, I would assume), there are no longer any prefix on the code block lines, causing the Command Line plugin to think that every line is an input line.Example
GitLab - contains example
.html
files and download copy of the Autoloader and Command Line plugins for testing. The files ending infrom_git
have a copy and pasted version of this file that I used to try and debug what was happening.JSFiddles (for the
.html
files in the repo):The text was updated successfully, but these errors were encountered: