From dc223a8067bd647d36e94b41d566bc9bff342f12 Mon Sep 17 00:00:00 2001 From: Chai Varier Date: Fri, 5 Nov 2021 15:39:49 -0400 Subject: [PATCH] minor refactor --- .../devtools/build/skydoc/rendering/MarkdownUtil.java | 6 +++--- .../java/com/google/devtools/build/skydoc/SkydocTest.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/google/devtools/build/skydoc/rendering/MarkdownUtil.java b/src/main/java/com/google/devtools/build/skydoc/rendering/MarkdownUtil.java index d2040546376ef9..e9cd11089c45aa 100644 --- a/src/main/java/com/google/devtools/build/skydoc/rendering/MarkdownUtil.java +++ b/src/main/java/com/google/devtools/build/skydoc/rendering/MarkdownUtil.java @@ -35,7 +35,7 @@ public final class MarkdownUtil { private static final int MAX_LINE_LENGTH = 100; /** - * Wrapper around {@link #markdownCellFormatWithRenderedHtml}, calling it with HTML rendering disabled. + * Wrapper around {@link #markdownCellFormatWithHtml}, calling it with HTML rendering disabled. * * @return The formatted string, upon which the following operations have been performed: * */ public String markdownCellFormat(String docString) { - return markdownCellFormatWithRenderedHtml(docString, false); + return markdownCellFormatWithHtml(docString, false); } /** @@ -71,7 +71,7 @@ public String markdownCellFormat(String docString) { *
  • Turn lingering new line tags into spaces (as they generally indicate intended line wrap. * */ - public String markdownCellFormatWithRenderedHtml(String docString, Boolean renderHtml) { + public String markdownCellFormatWithHtml(String docString, Boolean renderHtml) { String resultString = docString.trim(); if (!renderHtml) { resultString = htmlEscape(resultString); diff --git a/src/test/java/com/google/devtools/build/skydoc/SkydocTest.java b/src/test/java/com/google/devtools/build/skydoc/SkydocTest.java index 22179f981f0adf..a0d50b2a0aae01 100644 --- a/src/test/java/com/google/devtools/build/skydoc/SkydocTest.java +++ b/src/test/java/com/google/devtools/build/skydoc/SkydocTest.java @@ -853,8 +853,8 @@ public void testMarkdownCellFormat() throws Exception { } @Test - public void testMarkdownCellFormatWithRenderedHtml() throws Exception { - // Exercises markdownCellFormatWithRenderedHtml() with renderHtml set to true + public void testMarkdownCellFormatWithHtml() throws Exception { + // Exercises markdownCellFormatWithHtml() with renderHtml set to true String testData = " test_start :\n" + " Test
    \n" + " `test`\n" @@ -868,6 +868,6 @@ public void testMarkdownCellFormatWithRenderedHtml() throws Exception { + "Test
    test
       "
                             + "test  


    test

    test_end"; - assertThat(util.markdownCellFormatWithRenderedHtml(testData, true)).isEqualTo(expected); + assertThat(util.markdownCellFormatWithHtml(testData, true)).isEqualTo(expected); } }