Skip to content

Commit

Permalink
Allowing capital E to be used to express floating point numbers in Ma…
Browse files Browse the repository at this point in the history
…trix transformation parameter.
  • Loading branch information
blackears committed Nov 23, 2021
1 parent d314d1d commit 09ed1b7
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 2 deletions.
2 changes: 1 addition & 1 deletion svg-core/src/main/java/com/kitfox/svg/SVGElement.java
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ static protected AffineTransform parseTransform(String val) throws SVGException
return retXform;
}

private static final Pattern WORD_PATTERN = Pattern.compile("([a-zA-Z]+|-?\\d+(\\.\\d+)?(e-?\\d+)?|-?\\.\\d+(e-?\\d+)?)");
private static final Pattern WORD_PATTERN = Pattern.compile("([a-zA-Z]+|-?\\d+(\\.\\d+)?([eE]-?\\d+)?|-?\\.\\d+([eE]-?\\d+)?)");
static public AffineTransform parseSingleTransform(String val) throws SVGException
{
final Matcher matchWord = WORD_PATTERN.matcher("");
Expand Down
5 changes: 5 additions & 0 deletions svg-example/res/com/kitfox/svg/example/parseTransform.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 09ed1b7

Please sign in to comment.