Esempio n. 1
0
 private static List<string> ExtractCodeComments(HtmlNode articleNode)
 {
     var nginx = articleNode.GetElementsByClassName("nginx");
     return nginx?.Select(n => n.InnerText).ToList() ?? new List<string>();
 }
Esempio n. 2
0
 private static void DeleteCodeNodes(HtmlNode articleNode)
 {
     var codeNotes = articleNode.GetElementsByClassName("nginx");
     foreach (var node in codeNotes)
     {
         node.Remove();
     }
     codeNotes = articleNode.GetElementsByClassName("bash");
     foreach (var node in codeNotes)
     {
         node.Remove();
     }
 }