Skip to content

Commit

Permalink
Merge pull request #73 from zeoflow/stringcreator-api24-lower
Browse files Browse the repository at this point in the history
Fixed StringCreator fails on api 24 or lower
  • Loading branch information
teogor authored Apr 25, 2021
2 parents fba5695 + 489988d commit 827c856
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions flow-kit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,17 @@ dependencies {
implementation 'com.zeoflow:material-elements:2.4.1'
implementation 'com.zeoflow:stylar:1.1.0'

// todo remove this
api 'com.facebook.conceal:conceal:1.1.3@aar'

implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.fragment:fragment:1.3.2'

// todo remove this
implementation 'androidx.security:security-crypto:1.1.0-alpha03'

implementation("com.google.guava:guava:30.0-android")
implementation("com.google.crypto.tink:tink-android:1.5.0")

implementation 'io.reactivex.rxjava2:rxjava:2.2.21'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public final class StringCreator
{

private static final Pattern NAMED_ARGUMENT =
Pattern.compile("\\$(?<argumentName>[\\w_]+):(?<typeChar>[\\w]).*");
Pattern.compile("\\$(" + Pattern.quote("?<argumentName>") + "[\\w_]+):(" + Pattern.quote("?<typeChar>") + "[\\w]).*");
private static final Pattern LOWERCASE = Pattern.compile("[a-z]+[\\w_]*");

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ final class StringWriter
/**
* Sentinel value that indicates that no user-provided package has been set.
*/
private static final Pattern LINE_BREAKING_PATTERN = Pattern.compile("\\R");
private static final Pattern LINE_BREAKING_PATTERN = Pattern.compile(Pattern.quote("\\R"));

private final String indent;
private final LineWrapper out;
Expand Down

0 comments on commit 827c856

Please sign in to comment.