code cleaup
This commit is contained in:
parent
4b34d67b3b
commit
1b92b76fc9
3 changed files with 4 additions and 36 deletions
|
|
@ -29,8 +29,6 @@ Environment="ASPNETCORE_Smtp__Password=\"$ASPNETCORE_Smtp__Password\""
|
||||||
|
|
||||||
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
|
||||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||||
StandardOutput=syslog
|
|
||||||
StandardError=syslog
|
|
||||||
SyslogIdentifier=$APP_SYSLOG_ID
|
SyslogIdentifier=$APP_SYSLOG_ID
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
using DotMarkdown.Linq;
|
|
||||||
using Markdig;
|
|
||||||
using Xunit;
|
|
||||||
using static DotMarkdown.Linq.MFactory;
|
|
||||||
|
|
||||||
|
|
||||||
public class MarkdownTests
|
|
||||||
{
|
|
||||||
[Fact]
|
|
||||||
public void TestMarkdownRendering()
|
|
||||||
{
|
|
||||||
MDocument document = Document(
|
|
||||||
Heading1("Markdown Sample"),
|
|
||||||
Heading2("Bullet List"),
|
|
||||||
BulletList(
|
|
||||||
"text",
|
|
||||||
Bold("bold text")),
|
|
||||||
HorizontalRule(),
|
|
||||||
Heading2("IndentedCodeBlock"),
|
|
||||||
IndentedCodeBlock("string s = null;"));
|
|
||||||
|
|
||||||
Console.WriteLine(document.ToString());
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
[Fact]
|
|
||||||
public void TestAnotherMarkdownRendering()
|
|
||||||
{
|
|
||||||
var result = Markdown.ToHtml("This is a text with some *emphasis*");
|
|
||||||
|
|
||||||
|
|
||||||
Console.WriteLine(result);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -140,6 +140,10 @@ namespace Yavsc.Services
|
||||||
catch (FormatException ex)
|
catch (FormatException ex)
|
||||||
{
|
{
|
||||||
logger.LogError(ex, "Refusing to send email because the recipient or sender address is malformed. To={To}, From={From}", email, siteSettings.Owner.EMail);
|
logger.LogError(ex, "Refusing to send email because the recipient or sender address is malformed. To={To}, From={From}", email, siteSettings.Owner.EMail);
|
||||||
|
logger.LogError(ex.Message);
|
||||||
|
if (ex.InnerException!=null)
|
||||||
|
logger.LogError(ex.InnerException.Message);
|
||||||
|
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
catch (SmtpCommandException ex)
|
catch (SmtpCommandException ex)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue