private List<ColumnSpec> getColumnSpecs( List<List<String>> dataTableModel ) {
        if( dataTableModel.isEmpty() ) {
            return Collections.emptyList();
        }

        ColumnSpec[] result = new ColumnSpec[dataTableModel.get( 0 ).size()];
        for( int nrow = 0; nrow < dataTableModel.size(); nrow++ ) {
            List<String> row = dataTableModel.get( nrow );
            for( int ncol = 0; ncol < row.size(); ncol++ ) {
                String value = row.get( ncol );
                int width = Math.max( value.length(), 1 );
                ColumnSpec spec = result[ncol];
                if( spec == null ) {
                    spec = new ColumnSpec();
                    result[ncol] = spec;
                }
                if( width > spec.width ) {
                    spec.width = width;
                }

                if( nrow > 0 && Doubles.tryParse( value ) == null ) {
                    spec.leftAligned = true;
                }
            }
        }
        return Lists.newArrayList( result );
    }
Handles newlines by removing them and add new rows instead
jgiven-core/src/main/java/com/tngtech/jgiven/report/text/PlainTextTableWriter.java