Skip to content

Commit

Permalink
Show Language: Added title for plain text (#2555)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed Oct 1, 2020
1 parent 35cbc02 commit a409245
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion gulpfile.js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ async function languagePlugins() {
}

/** @type {Record<string, string>} */
const nonNullLanguageMap = {};
const nonNullLanguageMap = {
'none': 'Plain text'
};
for (const id in languagesMap) {
const title = languagesMap[id];
if (title) {
Expand Down
3 changes: 3 additions & 0 deletions plugins/show-language/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ <h2>HTML (Markup)</h2>
<h2>SVG</h2>
<p>The <code class="language-markup">data-language</code> attribute can be used to display a specific label whether it has been defined as a language or not.</p>
<pre data-language="SVG v1.1" data-src="assets/logo.svg"></pre>

<h2>Plain text</h2>
<pre class="language-none"><code>Just some text (aka. not code).</code></pre>
</section>

<footer data-src="assets/templates/footer.html" data-type="text/html"></footer>
Expand Down
1 change: 1 addition & 0 deletions plugins/show-language/prism-show-language.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

// The languages map is built automatically with gulp
var Languages = /*languages_placeholder[*/{
"none": "Plain text",
"html": "HTML",
"xml": "XML",
"svg": "SVG",
Expand Down
2 changes: 1 addition & 1 deletion plugins/show-language/prism-show-language.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a409245

Please sign in to comment.