core/src/main/java/org/markdownj/TextEditor.java
public TextEditor detabify(final int tabWidth) {
        replaceAll(Pattern.compile("(.*?)\\t"), new Replacement() {
            public String replacement(Matcher m) {
                String lineSoFar = m.group(1);
                int width = lineSoFar.length();
                StringBuilder replacement = new StringBuilder(lineSoFar);
                do {
                    replacement.append(' ');
                    ++width;
                } while (width % tabWidth != 0);
                return replacement.toString();
            }
        });
        return this;
    }
public TextEditor detabify(final int tabWidth) {
        replaceAll(Pattern.compile("(.*?)\\t"), new Replacement() {
            public String replacement(Matcher m) {
                String lineSoFar = m.group(1);
                int width = lineSoFar.length();
                StringBuilder replacement = new StringBuilder(lineSoFar);
                do {
                    replacement.append(' ');
                    ++width;
                } while (width % tabWidth != 0);
                return replacement.toString();
            }
        });
        return this;
    }
public TextEditor detabify ( final int tabWidth ) { replaceAll ( Pattern . compile ( "(.*?)\\t" ) , new Replacement ( ) { public String replacement ( Matcher m ) { String lineSoFar = m . group ( 1 ) ; int width = lineSoFar . length ( ) ; StringBuilder replacement = new StringBuilder ( lineSoFar ) ; do { replacement . append ( ' ' ) ; ++ width ; } while ( width % tabWidth != 0 ) ; return replacement . toString ( ) ; } } ) ; return this ; }
Convert tabs to spaces.

@param tabWidth  Number of spaces per tab.
@return
Convert tabs to spaces .