| | |
| | import static com.keenwrite.events.StatusEvent.clue; |
| | -import static com.keenwrite.events.StatusEvent.fire; |
| | import static com.keenwrite.util.FileWalker.walk; |
| | import static java.lang.String.format; |
 |
| | final var digits = toDigits( filename ); |
| | |
| | - // If first file has digits, only process files with digits |
| | - // If first file has no digits, process all files |
| | + // If first file has digits, only process files with digits. |
| | + // If first file has no digits, process all files. |
| | final var process = !useDigits || digits != -1; |
| | |
| | if( process ) { |
| | final var chapterNum = chapter.incrementAndGet(); |
| | + final var testValue = useDigits ? digits : chapterNum; |
| | |
| | - if( validator.test( chapterNum ) ) { |
| | + if( validator.test( testValue ) ) { |
| | clue( "Main.status.export.concat", file ); |
| | |