Add HyperlinkedImage + OrderedList components
Added 2 more components to the library which appear to be missing (???)
HyperlinkedImage
@Test
public void withTooltip() {
String text = new BoldText("Example alt text").toString();
String imageURL = "https://i.imgur.com/rP1uBWg.png";
String redirectTo = "https://github.com/Steppschuh/Java-Markdown-Generator";
String tooltip = "Java Markdown Generator is very useful!";
HyperlinkedImage image = new HyperlinkedImage(text, imageURL, redirectTo, tooltip);
System.out.println(image.toString());
}
Would result in the following:
[](https://github.com/Steppschuh/Java-Markdown-Generator)
Which renders as (hover over):
Without tooltip:
@Test
public void withoutTooltip() {
String text = new BoldText("Example alt text").toString();
String imageURL = "https://i.imgur.com/rP1uBWg.png";
String redirectTo = "https://github.com/Steppschuh/Java-Markdown-Generator";
HyperlinkedImage image = new HyperlinkedImage(text, imageURL, redirectTo, null);
System.out.println(image.toString());
}
Would result in the following:
[](https://github.com/Steppschuh/Java-Markdown-Generator)
Which renders as (hover over):

*Can have hyperlink as null too, with or without a tooltip*
OrderedList
@Test
public void renderOrderedList() {
OrderedList list = new OrderedList();
list.add(new OrderedListItem("An element")).add(new OrderedListItem("Another element through chaining"));
System.out.println(list);
}
Would create:
1. An element
2. Another element through chaining
Which results in:
- An element
- Another element through chaining
With builder:
@Test
public void orderedListWithBuilder() {
OrderedList list = new OrderedListBuilder()
.append("A")
.append("B")
.build();
System.out.println(list);
}
Would create:
1. A
2. B
Which results into:
- A
- B
Let me know if anything should be changed.
Hey, thanks a lot for your contribution!
@Steppschuh I need this change. Can I ask for a review?
@Steppschuh I need this change. Can I ask for a review?
This PR is old and probably wouldn't merge correctly. I suggest you create your own fork, introduce the changes as appropriate, and create another pull request.
@Revxrsal Thanks! I'll try.