Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix documentation for quarkus.hibernate-orm.enabled #31483

Merged
merged 2 commits into from
Mar 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
Comment on lines +224 to 228
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this makes it so that <strong> is rendered correctly by our Javadoc doclet?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I thought it was the problem initially as it wasn't handled at all. And then I had the good idea to have a look at the actual javadoc :).

I fixed the tests.

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