if (child.getSubstring().startsWith(WhitespaceStripper.SPACE)) { IdentValue whitespace = c.getCurrentStyle().getIdent(CSSName.WHITE_SPACE); if (whitespace == IdentValue.NORMAL || whitespace == IdentValue.NOWRAP || whitespace == IdentValue.PRE) { child.setSubstring(child.start_index + 1, child.end_index); } }
    public void addInlineChild(Context c, InlineBox ib) {        if (ib == null) {            throw new NullPointerException("trying to add null child");        }        if (getChildCount() == 0 && ib instanceof InlineTextBox) {//first box on line            InlineTextBox child = (InlineTextBox) ib;            if (child.getSubstring().startsWith(WhitespaceStripper.SPACE)) {                IdentValue whitespace = c.getCurrentStyle().getIdent(CSSName.WHITE_SPACE);                if (whitespace == IdentValue.NORMAL || whitespace == IdentValue.NOWRAP || whitespace == IdentValue.PRE) {                    child.setSubstring(child.start_index + 1, child.end_index);                }            }            if (child.getSubstring().equals("")) {                child.contentWidth = 0;                child.height = 0;            }        }        ib.setParent(this);        addChild(ib);        if (ib.isChildrenExceedBounds()) {            setChildrenExceedBounds(true);        }    }