Markdig.SyntaxHighlighting
Markdig.SyntaxHighlighting copied to clipboard
How to use `Markdig.SyntaxHighlighting`?
There is:
- the file "Code.cs", which contains the code; Logics:
- Get the code from the file "Code.cs";
- Format the syntax;
- Insert the code into the file "* .rtf"; 4. User. Opens the file "* .rtf", sees the formatted code (with syntax highlighting);
Objectives: Minimum: do at least some formatting of the code. Maximum: make code formatting as in VisualStruio. Questions.
- How to apply your library to my task?
Code (preliminary)
public List<string> GetContetn()
{
string[] lines = File.ReadAllLines(@"c:\test\visualStudio\01\Code.cs");
List<string> list = new List<string>(); // Результат
for (int i = 1; i < lines.Length; i++)
{
if (lines[i] == "")
continue;
// string[] lineParts = lines[i].Split(' ');
list.Add(lines[i]);
}
return list;
}