Browse Source

Added @alert Important support, which displays as a Warning but with the 'Important' title instead

tags/v0.10
Frans Bouma 10 years ago
parent
commit
72c701625b
2 changed files with 9 additions and 3 deletions
  1. +2
    -2
      src/DocNet/Properties/AssemblyInfo.cs
  2. +7
    -1
      src/MarkdownDeep/Block.cs

+ 2
- 2
src/DocNet/Properties/AssemblyInfo.cs View File

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.9.1.0")]
[assembly: AssemblyFileVersion("0.9.1")]
[assembly: AssemblyVersion("0.9.2.0")]
[assembly: AssemblyFileVersion("0.9.2")]

+ 7
- 1
src/MarkdownDeep/Block.cs View File

@@ -499,6 +499,7 @@ namespace MarkdownDeep
} }
string title = string.Empty; string title = string.Empty;
string faIconName = string.Empty; string faIconName = string.Empty;
string alertTypeClass = alertType;
switch(alertType) switch(alertType)
{ {
case "danger": case "danger":
@@ -509,6 +510,11 @@ namespace MarkdownDeep
title = "Warning!"; title = "Warning!";
faIconName = "warning"; faIconName = "warning";
break; break;
case "important":
title = "Important!";
faIconName = "warning";
alertTypeClass = "warning";
break;
case "neutral": case "neutral":
case "info": case "info":
title = "Info"; title = "Info";
@@ -516,7 +522,7 @@ namespace MarkdownDeep
break; break;
} }
b.Append("<div class=\"alert alert-"); b.Append("<div class=\"alert alert-");
b.Append(alertType);
b.Append(alertTypeClass);
b.Append("\"><span class=\"alert-title\"><i class=\"fa fa-"); b.Append("\"><span class=\"alert-title\"><i class=\"fa fa-");
b.Append(faIconName); b.Append(faIconName);
b.Append("\"></i> "); b.Append("\"></i> ");


Loading…
Cancel
Save