Beispiel #1
0
    private string PrepareMarkdownDocument(string content, string filename)
    {
        content = _markdown.FixLatex(content);
        _markdown.CheckCodeSegments(content, filename);
        _markdown.CheckLatexSegments(content, filename);

        content = _markdown.FixLinks(content);
        content = _markdown.FixImageLinks(content, filename);

        return(content);
    }
Beispiel #2
0
    private static async Task RunOptionsAsync(Options arg)
    {
        var src = new DirectoryInfo(arg.Source.FormatAsPath());
        var md  = new Markdown(new AppSettings());

        foreach (var file in src.EnumerateFiles("*.md", SearchOption.AllDirectories))
        {
            var content = await file.OpenText().ReadToEndAsync();

            md.CheckCodeSegments(content, file.FullName);
            md.CheckLatexSegments(content, file.FullName);
            md.CheckImageLinks(content, file.FullName);
        }
    }