mirror of
https://git.teknik.io/Teknikode/Teknik.git
synced 2023-08-02 14:16:22 +02:00
Fixed line highlighting
This commit is contained in:
parent
712833c9d7
commit
50e16d87cb
@ -6,7 +6,7 @@
|
||||
string format = Model.Syntax;
|
||||
string formatName = "Text";
|
||||
|
||||
if (HighlightHelper.Languages.ContainsKey(format))
|
||||
if (!string.IsNullOrEmpty(format) && HighlightHelper.Languages.ContainsKey(format))
|
||||
{
|
||||
formatName = HighlightHelper.Languages[format];
|
||||
}
|
||||
@ -48,7 +48,7 @@
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<pre class="line-numbers"><code class="language-@(format)">@Model.Content</code></pre>
|
||||
<pre class="line-numbers" id="code"><code class="language-@(format)">@Model.Content</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -4,7 +4,8 @@
|
||||
Layout = null;
|
||||
string format = Model.Syntax;
|
||||
string formatName = "Text";
|
||||
if (HighlightHelper.Languages.ContainsKey(format))
|
||||
|
||||
if (!string.IsNullOrEmpty(format) && HighlightHelper.Languages.ContainsKey(format))
|
||||
{
|
||||
formatName = HighlightHelper.Languages[format];
|
||||
}
|
||||
@ -26,7 +27,7 @@
|
||||
</head>
|
||||
<body data-twttr-rendered="true">
|
||||
|
||||
<pre class="line-numbers"><code class="language-@(format)">@Model.Content</code></pre>
|
||||
<pre class="line-numbers" id="code" style="border: none;"><code class="language-@(format)">@Model.Content</code></pre>
|
||||
|
||||
<bundle src="js/common.min.js" append-version="true"></bundle>
|
||||
<bundle src="js/paste.view.min.js" append-version="true"></bundle>
|
||||
|
@ -4,7 +4,7 @@
|
||||
string format = Model.Paste.Syntax;
|
||||
string formatName = "Text";
|
||||
|
||||
if (HighlightHelper.Languages.ContainsKey(format))
|
||||
if (!string.IsNullOrEmpty(format) && HighlightHelper.Languages.ContainsKey(format))
|
||||
{
|
||||
formatName = HighlightHelper.Languages[format];
|
||||
}
|
||||
@ -39,7 +39,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<pre class="line-numbers"><code class="language-@(format)">@Model.Paste.Content</code></pre>
|
||||
<pre class="line-numbers" id="code-@(Model.VaultItemId)"><code class="language-@(format)">@Model.Paste.Content</code></pre>
|
||||
}
|
||||
</div>
|
||||
<div class="show-more" id="show-more-bottom-@Model.VaultItemId">
|
||||
|
Loading…
Reference in New Issue
Block a user