madskristensen / MarkdownEditor

A Visual Studio extension
Other
408 stars 92 forks source link

Html template not working in visual studio 2017 #200

Open lvandenb opened 4 years ago

lvandenb commented 4 years ago

Installed product versions

Description

Generating HTML works but template md-template.html is not used ( provided in same folder as md file, also in root and in %userprofile%)

Steps to recreate

  1. Click Generate html

Current behavior

14/02/2020 7:38:54: System.NullReferenceException: Object reference not set to an instance of an object. at MarkdownEditor.GenerateHtml.GetTitle(String markdownFile, MarkdownDocument doc) in C:\projects\markdowneditor\src\Commands\GenerateHtmlTarget.cs:line 131 at MarkdownEditor.GenerateHtml.CreateFromHtmlTemplate(String markdownFile, String content, String html) in C:\projects\markdowneditor\src\Commands\GenerateHtmlTarget.cs:line 114

Expected behavior

create html within template

lvandenb commented 4 years ago

This is when there are no headers in the md file

Just adding a line with # or ## , in the md file, and everything is fine