org.liquidsite.core.text
Interface FormattingContext
- public interface FormattingContext
An text formatting context. This interface is used to provide the
context for the text formatting, such as methods to resolve
relative links and similar.
|
Method Summary |
java.lang.String |
linkTo(java.lang.String link)
Returns a relative link to an object. |
linkTo
public java.lang.String linkTo(java.lang.String link)
- Returns a relative link to an object. If the specified path
starts with '/' it is assumed to be relative to the site root
directory and will be modified to a page relative link. If the
link starts with a protocol (for example "http:") it is
considered absolute and will not be modified. Otherwise it is
assumed to be relative to the document and may be modified to
point to the document directory.
- Parameters:
link - the link URL
- Returns:
- the resolved URL link