public int recursiveEmitLine(final StringBuilder out, final String in, int start, MarkToken token) {
        int pos = start, idx;
        final StringBuilder temp = new StringBuilder();
        while(pos < in.length()) {
            final MarkToken mt = this.getToken(in, pos);
            if (token != MarkToken.NONE) {
		//System.err.println ("At char " + pos + ", returinging with buildder at " + out.toString());
                return pos;
	    }
	    //	    if ((mt == MarkToken.IMAGE) || (mt == MarkToken.LINK)) {
	    if (mt == MarkToken.LINK) {
		temp.setLength(0);
                idx = this.checkLink(temp, in, pos, mt);
                if (idx > 0)  {
                    out.append(temp);
                    pos = idx;
                } else {
                    out.append(in.charAt(pos));
                }

	    }  else if (mt == MarkToken.QUOTE) {
		// distinguish IMAGE from QUOTE
		if (in.charAt(pos + 1)  == '{') {
		    out.append("[");
		    pos = pos + 1;
		} else if (in.charAt(pos + 1) == '[') {
		    out.append("![");
		    pos = pos + 1;
		} else {
		    // ???
		}

		int nxt = Utils.readUntil(out, in, pos + 1, '}' );
		//System.err.println("Found '}' at " + nxt);
		out.append("]");
		pos = nxt;

	    } else {
		//System.err.println ("At char " + pos + ", handle token " + mt.toString());
                out.append(in.charAt(pos));
	    }
            pos++;
        }
	//System.err.println ("After whole string, returinging with buildder at " + out.toString());
        return -1;
    }