From 76709c8653a35f1085a3a9ce41b459154f851e3c Mon Sep 17 00:00:00 2001 From: Still Hsu <341464@gmail.com> Date: Sat, 11 Aug 2018 02:51:53 +0800 Subject: [PATCH] Fix forgotten line --- .../DescriptionPostProcessor.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/DocFX.Plugin.DescriptionGenerator/DescriptionPostProcessor.cs b/DocFX.Plugin.DescriptionGenerator/DescriptionPostProcessor.cs index 3345ddf..b40e76f 100644 --- a/DocFX.Plugin.DescriptionGenerator/DescriptionPostProcessor.cs +++ b/DocFX.Plugin.DescriptionGenerator/DescriptionPostProcessor.cs @@ -1,13 +1,9 @@ using System; -using System.Collections.Generic; using System.Collections.Immutable; -using System.Collections.ObjectModel; using System.Composition; -using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; -using System.Text; using HtmlAgilityPack; using Microsoft.DocAsCode.Common; using Microsoft.DocAsCode.Plugins; @@ -15,7 +11,7 @@ namespace DocFX.Plugin.DescriptionGenerator { [Export(nameof(DescriptionPostProcessor), typeof(IPostProcessor))] - public partial class DescriptionPostProcessor : IPostProcessor + public class DescriptionPostProcessor : IPostProcessor { private const int FixedDescriptionLength = 150; private const string FullStopDelimiter = ". "; @@ -56,7 +52,7 @@ public Manifest Process(Manifest manifest, string outputFolder) /// The original article path. /// The output path. /// The type of document. - private static void WriteMetadataTag(string sourcePath, string outputPath, ArticleType type) + private void WriteMetadataTag(string sourcePath, string outputPath, ArticleType type) { Logger.LogVerbose($"Processing metadata from {sourcePath} to {outputPath}..."); var htmlDoc = new HtmlDocument(); @@ -82,7 +78,10 @@ private static void WriteMetadataTag(string sourcePath, string outputPath, Artic } if (!string.IsNullOrEmpty(descriptionText)) + { AppendMetadata(htmlDoc, descriptionText).Save(outputPath); + _savedFiles++; + } } ///