code: public static void writeWithMarkup(Object value, MarkupType markupType, MediaEncoder encoder, Writer out) throws IOException {
  		if(encoder==null) {
  			writeWithMarkup(value, markupType, out);
  		} else {
  			if(value!=null) {
  				if(
  					value instanceof Writable
  					&& !((Writable)value).isFastToString()
  				) {
  					// Avoid intermediate String from Writable
  					Coercion.write(value, encoder, out);
  				} else {
  					String str = Coercion.toString(value);
  					BundleLookupMarkup lookupMarkup;
  					BundleLookupThreadContext threadContext = BundleLookupThreadContext.getThreadContext(false);
  					if(threadContext!=null) {
  						lookupMarkup = threadContext.getLookupMarkup(str);
  					} else {
  						lookupMarkup = null;
  					}
  					if(lookupMarkup!=null) lookupMarkup.appendPrefixTo(markupType, encoder, out);
  					encoder.write(str, out);
  					if(lookupMarkup!=null) lookupMarkup.appendSuffixTo(markupType, encoder, out);
  				}
  			}
  		}
  	}
docs: Writes a value with markup enabled using the provided encoder.
  
  @param  encoder  no encoding performed when null
  
  @see  MarkupType