| | |
| | import com.keenwrite.events.ExportFailedEvent; |
| | +import com.keenwrite.util.Diacritics; |
| | import com.keenwrite.util.FileWalker; |
| | import com.keenwrite.util.RangeValidator; |
 |
| | import static java.lang.Math.max; |
| | import static java.nio.charset.StandardCharsets.UTF_8; |
| | -import static java.text.Normalizer.Form.NFKD; |
| | -import static java.text.Normalizer.normalize; |
| | import static javafx.application.Platform.runLater; |
| | import static javafx.geometry.Pos.CENTER; |
 |
| | */ |
| | public final class ExportDialog extends AbstractDialog<ExportSettings> { |
| | - private static final String UNCRITIC = "\\p{InCombiningDiacriticalMarks}+"; |
| | - |
| | private record Theme( Path path, String name ) implements Comparable<Theme> { |
| | /** |
 |
| | */ |
| | public boolean matches( final String themeDir ) { |
| | - final var normalized = normalize( themeDir, NFKD ); |
| | - final var name = normalized.replaceAll( UNCRITIC, "" ); |
| | final var path = path().getFileName().toString(); |
| | |
| | - return path.equalsIgnoreCase( name ); |
| | + return path.equalsIgnoreCase( Diacritics.remove( themeDir ) ); |
| | } |
| | |