Search in sources :

Example 1 with WordURL

use of pl.asie.charset.module.tablet.format.words.WordURL in project Charset by CharsetMC.

the class CommandURL method call.

@Override
public void call(ITypesetter typesetter, ITokenizer tokenizer) throws TruthError {
    String uriLink = tokenizer.getParameter("\\url missing parameter: uriLink");
    String content = tokenizer.getParameter("\\url missing parameter: content");
    try {
        typesetter.write(new WordURL(content, new URI(uriLink)));
    } catch (Exception e) {
        e.printStackTrace();
        throw new TruthError(e.getMessage());
    }
}
Also used : TruthError(pl.asie.charset.module.tablet.format.api.TruthError) WordURL(pl.asie.charset.module.tablet.format.words.WordURL) URI(java.net.URI)

Aggregations

URI (java.net.URI)1 TruthError (pl.asie.charset.module.tablet.format.api.TruthError)1 WordURL (pl.asie.charset.module.tablet.format.words.WordURL)1