From 0ed278f41f2ec1af8e7506ba1fb1874c7435b526 Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Fri, 10 Jan 2020 21:22:50 +0100 Subject: [PATCH] Fix for latest commits --- src/main/java/writer2latex/xhtml/TextStyleConverter.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/writer2latex/xhtml/TextStyleConverter.java b/src/main/java/writer2latex/xhtml/TextStyleConverter.java index 4cb57ec..b5e5f41 100644 --- a/src/main/java/writer2latex/xhtml/TextStyleConverter.java +++ b/src/main/java/writer2latex/xhtml/TextStyleConverter.java @@ -96,9 +96,14 @@ public class TextStyleConverter extends StyleWithPropertiesConverterHelper { } this.bConvertFont = !config.useDefaultFont(); - String minLS = config.minLetterSpacing().replaceAll("[a-zA-Z]", ""); + String minLS = config.minLetterSpacing().replaceAll("[^0-9,.,-]", ""); if (!minLS.equals("")) { - this.minLetterSpacing = Double.parseDouble(minLS); + try { + this.minLetterSpacing = Double.parseDouble(minLS); + } catch (NumberFormatException e) { + System.out.println("Exception was thrown: \n" + e.toString()); + } + } }