File tree 3 files changed +12
-6
lines changed
AzureDevOps.WikiPDFExport 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 14
14
" --verbose" ,
15
15
//"-p..\\AzureDevOps.WikiPDFExport.Test\\Tests\\DeepLink",
16
16
" -p..\\ AzureDevOps.WikiPDFExport.Test\\ Tests\\ AzureDevOps.WikiPDFExport.wiki" ,
17
- // "--attachments-path=..\\AzureDevOps.WikiPDFExport.Test\\Tests\\AzureDevOps.WikiPDFExport.wiki\\.attachments\\",
18
- // "-p..\\AzureDevOps.WikiPDFExport.Test\\Tests\\Code",
19
- // "-p..\\AzureDevOps.WikiPDFExport.Test\\Tests\\Azure-Platform-Design",
20
- // "-p..\\AzureDevOps.WikiPDFExport.Test\\Tests\\1k",
21
- // "-s..\\AzureDevOps.WikiPDFExport.Test\\Tests\\Test-Emoticon\\emoji.md",
17
+ // "--attachments-path=..\\AzureDevOps.WikiPDFExport.Test\\Tests\\AzureDevOps.WikiPDFExport.wiki\\.attachments\\",
18
+ // "-p..\\AzureDevOps.WikiPDFExport.Test\\Tests\\Code",
19
+ // "-p..\\AzureDevOps.WikiPDFExport.Test\\Tests\\Azure-Platform-Design",
20
+ // "-p..\\AzureDevOps.WikiPDFExport.Test\\Tests\\1k",
21
+ // "-s..\\AzureDevOps.WikiPDFExport.Test\\Tests\\Test-Emoticon\\emoji.md",
22
22
" --heading" ,
23
23
" --breakPage" ,
24
24
// "-m",
Original file line number Diff line number Diff line change @@ -407,8 +407,10 @@ private string ConvertMarkdownToHTML(List<MarkdownFile> files)
407
407
pipelineBuilder . Extensions . RemoveAll ( x => x is Markdig . Extensions . AutoIdentifiers . AutoIdentifierExtension ) ;
408
408
//handled by katex
409
409
pipelineBuilder . Extensions . RemoveAll ( x => x is Markdig . Extensions . Mathematics . MathExtension ) ;
410
+
411
+ //todo: is this needed? it will stop support of resizing images:
410
412
//this interferes with katex parsing of {} elements.
411
- pipelineBuilder . Extensions . RemoveAll ( x => x is Markdig . Extensions . GenericAttributes . GenericAttributesExtension ) ;
413
+ // pipelineBuilder.Extensions.RemoveAll(x => x is Markdig.Extensions.GenericAttributes.GenericAttributesExtension);
412
414
413
415
DeepLinkExtension deeplink = new DeepLinkExtension ( ) ;
414
416
pipelineBuilder . Extensions . Add ( deeplink ) ;
@@ -461,6 +463,10 @@ private string ConvertMarkdownToHTML(List<MarkdownFile> files)
461
463
462
464
var md = mf . Content ;
463
465
466
+ if ( string . IsNullOrEmpty ( md ) ) {
467
+ Log ( $ "File { file . FullName } is empty and will be skipped!", LogLevel . Warning , 1 ) ;
468
+ continue ; }
469
+
464
470
//rename TOC tags to fit to MarkdigToc or delete them from each markdown document
465
471
var newTOCString = _options . GlobalTOC != null ? "" : "[TOC]" ;
466
472
md = md . Replace ( "[[_TOC_]]" , newTOCString ) ;
You can’t perform that action at this time.
0 commit comments