Skip to content

Commit

Permalink
Merge pull request #31483 from gsmet/fix-orm-enabled-doc
Browse files Browse the repository at this point in the history
Fix documentation for quarkus.hibernate-orm.enabled
  • Loading branch information
gsmet authored Mar 1, 2023
2 parents d94521f + 93b4fd2 commit 4a0c2af
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,17 @@ final class JavaDocParser {
private static final String NEW_LINE = "\n";
private static final String LINK_NODE = "a";
private static final String BOLD_NODE = "b";
private static final String STRONG_NODE = "strong";
private static final String BIG_NODE = "big";
private static final String CODE_NODE = "code";
private static final String DEL_NODE = "del";
private static final String ITALICS_NODE = "i";
private static final String EMPHASIS_NODE = "em";
private static final String TEXT_NODE = "#text";
private static final String UNDERLINE_NODE = "u";
private static final String NEW_LINE_NODE = "br";
private static final String PARAGRAPH_NODE = "p";
private static final String SMALL_NODE = "small";
private static final String EMPHASIS_NODE = "em";
private static final String LIST_ITEM_NODE = "li";
private static final String HREF_ATTRIBUTE = "href";
private static final String STRIKE_NODE = "strike";
Expand Down Expand Up @@ -220,11 +221,12 @@ private void appendHtml(StringBuilder sb, Node node) {
sb.append(BACKTICK);
break;
case BOLD_NODE:
case EMPHASIS_NODE:
case STRONG_NODE:
sb.append(STAR);
appendHtml(sb, childNode);
sb.append(STAR);
break;
case EMPHASIS_NODE:
case ITALICS_NODE:
sb.append(UNDERSCORE);
appendHtml(sb, childNode);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,14 @@ public void parseJavaDocWithStyles() {
String parsed = parser.parseConfigDescription(javaDoc);
assertEquals(expectedOutput, parsed);

javaDoc = "hello <strong>world</strong>";
expectedOutput = "hello *world*";
parsed = parser.parseConfigDescription(javaDoc);
assertEquals(expectedOutput, parsed);

// Emphasized
javaDoc = "<em>hello world</em>";
expectedOutput = "*hello world*";
expectedOutput = "_hello world_";
parsed = parser.parseConfigDescription(javaDoc);
assertEquals(expectedOutput, parsed);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
public class HibernateOrmConfig {

/**
* Whether Hibernate ORM is enabled <strong>during the build</strong>.
* Whether Hibernate ORM is enabled *during the build*.
*
* If Hibernate ORM is disabled during the build, all processing related to Hibernate ORM will be skipped,
* but it will not be possible to activate Hibernate ORM at runtime:
Expand Down

0 comments on commit 4a0c2af

Please sign in to comment.