Skip to content

Commit b67fff3

Browse files
authored
fix: update client header to use <h3> instead of <h2> (#179)
1 parent 4614274 commit b67fff3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

third_party/docfx-doclet-143274/src/main/java/com/microsoft/util/YamlUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ public static String cleanupHtml(String text) {
3535
.replaceAll("\\{@link *\"([^\\{]+)\" *\\}", "<a href=\"$1\">$1</a>")
3636
.replaceAll("\\[([^]]+)]\\[([^]]+)\\]", "<xref uid=\"$2\" data-throw-if-not-resolved=\"false\">$1</xref>")
3737
.replaceAll("\\{@link *([^\\{\"]+) *\\}", "<xref uid=\"$1\" data-throw-if-not-resolved=\"false\">$1</xref>")
38-
.replaceAll("=======================([^=]+)=======================", "<h2>$1</h2>");
38+
.replaceAll("=======================([^=]+)=======================", "<h3>$1</h3>");
3939
}
4040
}

third_party/docfx-doclet-143274/src/test/java/com/microsoft/util/YamlUtilTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public void cleanupHtmlAddHrefTagsTest() {
121121
@Test
122122
public void cleanupHtmlEqualTitlesTest() {
123123
String expectedActual = "======================= SpeechClient =======================";
124-
String expectedResult = "<h2> SpeechClient </h2>";
124+
String expectedResult = "<h3> SpeechClient </h3>";
125125
String random = UUID.randomUUID().toString();
126126

127127
assertEquals(expectedResult, YamlUtil.cleanupHtml(expectedActual));

third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ items:
2020
nameWithType: "com.microsoft.samples"
2121
fullName: "com.microsoft.samples"
2222
type: "Namespace"
23-
summary: "The interfaces provided are listed below, along with usage samples.\n\n <p><h2> SpeechClient </h2>\n\n <p>Service Description: Service that implements Google Cloud Speech API.\n\n <p>Sample for SpeechClient:\n\n <pre class=\"prettyprint lang-java\"><code>\n try (SpeechClient speechClient = SpeechClient.create()) {\n RecognitionConfig config = RecognitionConfig.newBuilder().build();\n RecognitionAudio audio = RecognitionAudio.newBuilder().build();\n RecognizeResponse response = speechClient.recognize(config, audio);\n }\n </code></pre>\n\n <p><h2> AdaptationClient </h2>\n\n <p>Service Description: Service that implements Google Cloud Speech Adaptation API.\n\n <p>Sample for AdaptationClient:\n\n <pre class=\"prettyprint lang-java\"><code>\n try (AdaptationClient adaptationClient = AdaptationClient.create()) {\n LocationName parent = LocationName.of(\"[PROJECT]\", \"[LOCATION]\");\n PhraseSet phraseSet = PhraseSet.newBuilder().build();\n String phraseSetId = \"phraseSetId959902180\";\n PhraseSet response = adaptationClient.createPhraseSet(parent, phraseSet, phraseSetId);\n }\n </code></pre>"
23+
summary: "The interfaces provided are listed below, along with usage samples.\n\n <p><h3> SpeechClient </h3>\n\n <p>Service Description: Service that implements Google Cloud Speech API.\n\n <p>Sample for SpeechClient:\n\n <pre class=\"prettyprint lang-java\"><code>\n try (SpeechClient speechClient = SpeechClient.create()) {\n RecognitionConfig config = RecognitionConfig.newBuilder().build();\n RecognitionAudio audio = RecognitionAudio.newBuilder().build();\n RecognizeResponse response = speechClient.recognize(config, audio);\n }\n </code></pre>\n\n <p><h3> AdaptationClient </h3>\n\n <p>Service Description: Service that implements Google Cloud Speech Adaptation API.\n\n <p>Sample for AdaptationClient:\n\n <pre class=\"prettyprint lang-java\"><code>\n try (AdaptationClient adaptationClient = AdaptationClient.create()) {\n LocationName parent = LocationName.of(\"[PROJECT]\", \"[LOCATION]\");\n PhraseSet phraseSet = PhraseSet.newBuilder().build();\n String phraseSetId = \"phraseSetId959902180\";\n PhraseSet response = adaptationClient.createPhraseSet(parent, phraseSet, phraseSetId);\n }\n </code></pre>"
2424
syntax:
2525
content: "package com.microsoft.samples"
2626
javaType: "package"

0 commit comments

Comments
 (0)