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

Show Language: Added title for plain text #2555

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.