Skip to content

Commit ac2a6a9

Browse files
authored
Merge branch 'main' into chore-add-support-for-forked-repository
2 parents fa41fed + 59218fd commit ac2a6a9

File tree

8 files changed

+128
-118
lines changed

8 files changed

+128
-118
lines changed

Directory.Packages.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
<PackageVersion Include="Microsoft.CodeAnalysis.VisualBasic" Version="4.9.2" />
1919
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="4.9.2" />
2020
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.9.2" />
21-
<PackageVersion Include="Microsoft.Playwright" Version="1.40.0" />
21+
<PackageVersion Include="Microsoft.Playwright" Version="1.42.0" />
2222
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
2323
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
2424
<PackageVersion Include="OneOf" Version="3.0.263" />
2525
<PackageVersion Include="OneOf.SourceGenerator" Version="3.0.263" />
26-
<PackageVersion Include="PdfPig" Version="0.1.9-alpha-20240219-c2536" />
26+
<PackageVersion Include="PdfPig" Version="0.1.9-alpha-20240312-845e3" />
2727
<PackageVersion Include="PlantUml.Net" Version="1.4.80" />
2828
<PackageVersion Include="Spectre.Console" Version="0.48.0" />
2929
<PackageVersion Include="Spectre.Console.Cli" Version="0.48.0" />
@@ -37,7 +37,7 @@
3737
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
3838
<PackageVersion Include="PublicApiGenerator" Version="11.1.0" />
3939
<PackageVersion Include="Verify.DiffPlex" Version="2.3.0" />
40-
<PackageVersion Include="Verify.Xunit" Version="23.2.3" />
40+
<PackageVersion Include="Verify.Xunit" Version="23.5.0" />
4141
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.7" />
4242
<PackageVersion Include="xunit" Version="2.7.0" />
4343
</ItemGroup>

src/Docfx.App/PdfBuilder.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Collections.Concurrent;
55
using System.Diagnostics;
66
using System.Reflection;
7+
using System.Text;
78
using System.Text.Json;
89
using Docfx.Build;
910
using Docfx.Common;
@@ -137,7 +138,7 @@ await CreatePdf(
137138
IResult TocPage(string url)
138139
{
139140
var pageNumbers = pdfPageNumbers.TryGetValue(url, out var x) ? x : default;
140-
return Results.Content(TocHtmlTemplate(new Uri(baseUrl!, url), pdfTocs[url], pageNumbers).ToString(), "text/html");
141+
return Results.Content(TocHtmlTemplate(new Uri(baseUrl!, url), pdfTocs[url], pageNumbers).ToString(), "text/html", Encoding.UTF8);
141142
}
142143

143144
async Task<byte[]?> PrintPdf(Outline outline, Uri url)

src/Docfx.Dotnet/Parsers/XmlComment.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ public static XmlComment Parse(string xml, XmlCommentParserContext context = nul
112112
}
113113
try
114114
{
115+
// Format xml with indentation.
116+
// It's needed to fix issue (https://github.com/dotnet/docfx/issues/9736)
117+
xml = XElement.Parse(xml).ToString(SaveOptions.None);
118+
115119
return new XmlComment(xml, context ?? new());
116120
}
117121
catch (XmlException)

src/docfx/Properties/launchSettings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"commandLineArgs": "pdf ../../samples/seed/docfx.json",
4141
"workingDirectory": ".",
4242
"environmentVariables": {
43+
"DOCFX_PDF_TIMEOUT": "0"
4344
}
4445
},
4546
// Run `docfx download` command.
@@ -56,6 +57,7 @@
5657
"commandLineArgs": "../../samples/seed/docfx.json",
5758
"workingDirectory": ".",
5859
"environmentVariables": {
60+
"DOCFX_PDF_TIMEOUT": "0"
5961
}
6062
}
6163
}

templates/modern/layout/_master.tmpl

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,27 +37,27 @@
3737
<meta name="loc:changeTheme" content="{{__global.changeTheme}}">
3838
<meta name="loc:copy" content="{{__global.copy}}">
3939
<meta name="loc:downloadPdf" content="{{__global.downloadPdf}}">
40-
{{/redirect_url}}
41-
</head>
4240

43-
{{^redirect_url}}
44-
<script type="module" src="./{{_rel}}public/docfx.min.js"></script>
41+
<script type="module" src="./{{_rel}}public/docfx.min.js"></script>
4542

46-
<script>
47-
const theme = localStorage.getItem('theme') || 'auto'
48-
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
49-
</script>
43+
<script>
44+
const theme = localStorage.getItem('theme') || 'auto'
45+
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
46+
</script>
5047

51-
{{#_googleAnalyticsTagId}}
52-
<script async src="https://www.googletagmanager.com/gtag/js?id={{_googleAnalyticsTagId}}"></script>
53-
<script>
54-
window.dataLayer = window.dataLayer || [];
55-
function gtag() { dataLayer.push(arguments); }
56-
gtag('js', new Date());
57-
gtag('config', '{{_googleAnalyticsTagId}}');
58-
</script>
59-
{{/_googleAnalyticsTagId}}
48+
{{#_googleAnalyticsTagId}}
49+
<script async src="https://www.googletagmanager.com/gtag/js?id={{_googleAnalyticsTagId}}"></script>
50+
<script>
51+
window.dataLayer = window.dataLayer || [];
52+
function gtag() { dataLayer.push(arguments); }
53+
gtag('js', new Date());
54+
gtag('config', '{{_googleAnalyticsTagId}}');
55+
</script>
56+
{{/_googleAnalyticsTagId}}
57+
{{/redirect_url}}
58+
</head>
6059

60+
{{^redirect_url}}
6161
<body class="tex2jax_ignore" data-layout="{{_layout}}{{layout}}" data-yaml-mime="{{yamlmime}}">
6262
<header class="bg-body border-bottom">
6363
{{^_disableNavbar}}

0 commit comments

Comments
 (0)