Skip to content

Add HyperlinkedImage + OrderedList components - #13

Open
Revxrsal wants to merge 7 commits into
Steppschuh:devfrom
Revxrsal:master
Open

Add HyperlinkedImage + OrderedList components#13
Revxrsal wants to merge 7 commits into
Steppschuh:devfrom
Revxrsal:master

Conversation

@Revxrsal

Copy link
Copy Markdown

Added 2 more components to the library which appear to be missing (???)

HyperlinkedImage

@TestpublicvoidwithTooltip() {
Stringtext = newBoldText("Example alt text").toString();
StringimageURL = "https://i.imgur.com/rP1uBWg.png";
StringredirectTo = "https://github.com/Steppschuh/Java-Markdown-Generator";
Stringtooltip = "Java Markdown Generator is very useful!";
HyperlinkedImageimage = newHyperlinkedImage(text, imageURL, redirectTo, tooltip);
System.out.println(image.toString());
}

Would result in the following:

[![**Example alt text**](https://i.imgur.com/rP1uBWg.png"Java Markdown Generator is very useful!")](https://github.com/Steppschuh/Java-Markdown-Generator)

Which renders as (hover over):

Example alt text

Without tooltip:

@TestpublicvoidwithoutTooltip() {
Stringtext = newBoldText("Example alt text").toString();
StringimageURL = "https://i.imgur.com/rP1uBWg.png";
StringredirectTo = "https://github.com/Steppschuh/Java-Markdown-Generator";
HyperlinkedImageimage = newHyperlinkedImage(text, imageURL, redirectTo, null);
System.out.println(image.toString());
}

Would result in the following:

[![**Example alt text**](https://i.imgur.com/rP1uBWg.png)](https://github.com/Steppschuh/Java-Markdown-Generator)

Which renders as (hover over):
Example alt text

*Can have hyperlink as null too, with or without a tooltip*

OrderedList

@TestpublicvoidrenderOrderedList() {
OrderedListlist = newOrderedList();
list.add(newOrderedListItem("An element")).add(newOrderedListItem("Another element through chaining"));
System.out.println(list);
}

Would create:

1. An element
2. Another element through chaining

Which results in:

  1. An element
  2. Another element through chaining

With builder:

@TestpublicvoidorderedListWithBuilder() {
OrderedListlist = newOrderedListBuilder()
.append("A")
.append("B")
.build();
System.out.println(list);
}

Would create:

1. A
2. B

Which results into:

  1. A
  2. B

Let me know if anything should be changed.

@Steppschuh
Steppschuh changed the base branch from master to devJuly 14, 2020 07:40
@Steppschuh
Steppschuh self-requested a review July 14, 2020 07:42
@Steppschuh

Copy link
Copy Markdown
Owner

Hey, thanks a lot for your contribution!

@SteppschuhSteppschuh left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Would be nice if you could also add examples to the readme and maybe some test cases. If you don't feel like it that's also fine, in that case I'll do it later.

Revxrsaland others added 2 commits July 15, 2020 13:28
Co-authored-by: Stephan Schultz <register@steppschuh.net>
…generator/list/OrderedList.java
Co-authored-by: Stephan Schultz <register@steppschuh.net>
@Javakky

Copy link
Copy Markdown

@Steppschuh
I need this change. Can I ask for a review?

@Revxrsal

Copy link
Copy Markdown
Author

@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.

@Javakky-pxv

Copy link
Copy Markdown

@Revxrsal
Thanks! I'll try.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@Revxrsal@Steppschuh@Javakky@Javakky-pxv