rules: reformat input line handling