whizu / whizu.java

Whizu™ is a lightweight Java library that makes it easy to create fast and good looking jQuery Mobile applications. It focuses on the development of HTML5 web applications with developer productivity and runtime performance as key objectives.
www.whizu.org
Other
4 stars 1 forks source link

Clean up the code to include hyperlinks in paragraphs #31

Open rdhauwe opened 11 years ago

rdhauwe commented 11 years ago

e.g. org.whizu.tutorial.website.About.java

p("Whizu is software available for <a href='/download'>download</a>.")

Consider e.g. the following possible solution:

p("Whizu is software available for $1.", a("download", "/download"));

Or alternatively:

@Define("#download")
private Content download = a("download", "/download"));
....
p("Whizu is software available for #download.");
rdhauwe commented 11 years ago

Markdown format is now supported and a bit cleaner:

/**
 * In case the conditions and obligations of the EUPL are not suitable for
 * your intended use, please [contact us](/contact.whizu) to see how we can
 * better support your needs with a more permissive or a commercial license
 * under a dual licensing scheme.
*/
@Markdown
private String contentWithHyperlink;
rdhauwe commented 11 years ago

Also with @Markdown it must however be possible to define and manage hyperlinks just once.

/**
 * Whizu is open source software available for free [download]({}) and for
 * free use under the terms of the European Union Public License.
 */
@Markdown
public String about;

What would be a cool API to inject the hyperlink into the markdown content?