From 4c8d384c506f708f14b1f36eb0f38df79782ba07 Mon Sep 17 00:00:00 2001 From: Alice Li Date: Tue, 25 Apr 2023 15:19:15 -0400 Subject: [PATCH] fix: update client header to use

instead of

--- .../src/main/java/com/microsoft/util/YamlUtil.java | 2 +- .../src/test/java/com/microsoft/util/YamlUtilTest.java | 2 +- .../expected-generated-files/com.microsoft.samples.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/third_party/docfx-doclet-143274/src/main/java/com/microsoft/util/YamlUtil.java b/third_party/docfx-doclet-143274/src/main/java/com/microsoft/util/YamlUtil.java index 7f0a1f97..7fd6bbf6 100644 --- a/third_party/docfx-doclet-143274/src/main/java/com/microsoft/util/YamlUtil.java +++ b/third_party/docfx-doclet-143274/src/main/java/com/microsoft/util/YamlUtil.java @@ -35,6 +35,6 @@ public static String cleanupHtml(String text) { .replaceAll("\\{@link *\"([^\\{]+)\" *\\}", "$1") .replaceAll("\\[([^]]+)]\\[([^]]+)\\]", "$1") .replaceAll("\\{@link *([^\\{\"]+) *\\}", "$1") - .replaceAll("=======================([^=]+)=======================", "

$1

"); + .replaceAll("=======================([^=]+)=======================", "

$1

"); } } diff --git a/third_party/docfx-doclet-143274/src/test/java/com/microsoft/util/YamlUtilTest.java b/third_party/docfx-doclet-143274/src/test/java/com/microsoft/util/YamlUtilTest.java index 605a3b7c..b2856fda 100644 --- a/third_party/docfx-doclet-143274/src/test/java/com/microsoft/util/YamlUtilTest.java +++ b/third_party/docfx-doclet-143274/src/test/java/com/microsoft/util/YamlUtilTest.java @@ -121,7 +121,7 @@ public void cleanupHtmlAddHrefTagsTest() { @Test public void cleanupHtmlEqualTitlesTest() { String expectedActual = "======================= SpeechClient ======================="; - String expectedResult = "

SpeechClient

"; + String expectedResult = "

SpeechClient

"; String random = UUID.randomUUID().toString(); assertEquals(expectedResult, YamlUtil.cleanupHtml(expectedActual)); diff --git a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.yml b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.yml index c1395567..5e519216 100644 --- a/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.yml +++ b/third_party/docfx-doclet-143274/src/test/resources/expected-generated-files/com.microsoft.samples.yml @@ -20,7 +20,7 @@ items: nameWithType: "com.microsoft.samples" fullName: "com.microsoft.samples" type: "Namespace" - summary: "The interfaces provided are listed below, along with usage samples.\n\n

SpeechClient

\n\n

Service Description: Service that implements Google Cloud Speech API.\n\n

Sample for SpeechClient:\n\n

\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 
\n\n

AdaptationClient

\n\n

Service Description: Service that implements Google Cloud Speech Adaptation API.\n\n

Sample for AdaptationClient:\n\n

\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 
" + summary: "The interfaces provided are listed below, along with usage samples.\n\n

SpeechClient

\n\n

Service Description: Service that implements Google Cloud Speech API.\n\n

Sample for SpeechClient:\n\n

\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 
\n\n

AdaptationClient

\n\n

Service Description: Service that implements Google Cloud Speech Adaptation API.\n\n

Sample for AdaptationClient:\n\n

\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 
" syntax: content: "package com.microsoft.samples" javaType: "package"