Closed andrzejQ closed 1 year ago
Hi, I would like to implement a more generic function, which allows to post process the html which was created by markdig, before the result is shown. You can think of some kind of pipeline Markdown->Markdig(HTML)->(optional) Postprocessor(HTML)->Viewer(IE11). To allow more flexibility this "Postprocessor" should to be a commandline programm. This commandline program could use all kinds of libraries, but its not required to ship them with the actual plugin. I have added an example project under PPExtensions\MdpPostprocessorTemplate\MdpPostprocessorTemplate.sln Could you please try create a new postprocessor project with your RegExp/Kramdown functionality?
Corrections of kramdown syntax should be applied before Markdig(HTML).
I'm not considering totally translating kramdown
into markdown
. I don't know if that's possible. I only applied the correction of selected syntaxes, for the cases I use in the Jekyll blog. Maybe in general it is not worth worrying about this matter. I can handle a simple snippet into the MarkdownPreviewForm.cs
code (without configuration in the NppMd
Settings
), which I can easily add myself in future versions.
I dont see a problem to integrate an optional preprocessor or postprocessor. Maybe that makes it easier for you to apply your adjusments, but I think these adjusments are to specific to integrate them in the core plugin.
The last commit adds the possibility to run pre/post processor commands (commandline programs)
You have to change the config under plugins/Config/NppMarkdownPanel.ini
to enable this feature.
[Options]
PreProcessorExe=C:\temp\other.exe
PreProcessorArguments=%inputfile% %outputfile%
PostProcessorExe=C:\development\NppMarkdownPanel\PPExtensions\MdpPrePostprocessorTemplate\bin\Debug\MdpPrePostprocessorTemplate.exe
PostProcessorArguments=%inputfile% %outputfile%
Maybe that will help with your issue
RegExp3
to convert some expressions of Jekyll kramdown to markdown. But it can be ignored if there is a small circle interested in such a change.