diff --git a/core/src/main/java/com/salesforce/slds/shared/RegexPattern.java b/core/src/main/java/com/salesforce/slds/shared/RegexPattern.java index caeeec4..ba743fa 100644 --- a/core/src/main/java/com/salesforce/slds/shared/RegexPattern.java +++ b/core/src/main/java/com/salesforce/slds/shared/RegexPattern.java @@ -45,5 +45,5 @@ public class RegexPattern { public static final String VAR_FUNCTION = "var\\(\\s*--lwc-(?[\\w\\d-]+)\\s*(,\\s*(?"+ COLOR_PATTERN + "|" + NUMERIC_PATTERN + "|" + WORD_FRAGMENT + ")\\s*)?\\)"; - public static final String IMPORT_AND_EXPORT_TOKENS = "(:?\\s+|^)import\\s+|(:?\\s+|^)export\\s+"; + public static final String IMPORT_AND_EXPORT_TOKENS = "(:?^\\s*)import\\s+|(:?^\\s*)export\\s+"; } diff --git a/core/src/main/java/com/salesforce/slds/shared/models/core/Entry.java b/core/src/main/java/com/salesforce/slds/shared/models/core/Entry.java index 89c0ede..ffa40fa 100644 --- a/core/src/main/java/com/salesforce/slds/shared/models/core/Entry.java +++ b/core/src/main/java/com/salesforce/slds/shared/models/core/Entry.java @@ -26,17 +26,13 @@ public enum EntityType {LWC, AURA, OTHER} private String path; private final List rawContent; - private Bundle bundle; private String componentName; private EntityType entityType; - private Entry(List recommendation, List overrides, + private Entry( List inputs, String path, List rawContent, EntityType entityType, String componentName) { - - this.overrides = overrides; - this.recommendation = recommendation; this.inputs = inputs; this.path = path; this.rawContent = rawContent; @@ -44,10 +40,6 @@ private Entry(List recommendation, List overr this.componentName = componentName; } - public boolean hasRecommendation() { - return this.getRecommendation().isEmpty() == false; - } - public List getRecommendation() { if (this.recommendation == null) { this.recommendation = new ArrayList<>(); @@ -60,10 +52,6 @@ public void setRecommendation(List recommendation) { this.recommendation = recommendation; } - public boolean hasOverrides() { - return this.getOverrides().isEmpty() == false; - } - public List getOverrides() { if (this.overrides == null) { this.overrides = new ArrayList<>(); @@ -108,18 +96,6 @@ public List getRawContent() { return this.rawContent; } - public void setBundle(Bundle bundle) { - this.bundle = bundle; - } - - public Bundle getBundle() { - if (this.bundle == null) { - this.bundle = new Bundle(); - } - - return this.bundle; - } - public void setComponentName(String componentName) { this.componentName = componentName; } @@ -141,25 +117,17 @@ public static EntryBuilder builder() { } public static class EntryBuilder { - private List recommendation; private List inputs; private String path; private List rawContent; - private List overrides; private EntityType entityType; private String componentName; - public EntryBuilder recommendation(List recommendation) { - this.recommendation = recommendation; - return this; - } - public EntryBuilder inputs(List inputs) { this.inputs = inputs; return this; } - public EntryBuilder path(String path) { this.path = path; return this; @@ -170,11 +138,6 @@ public EntryBuilder rawContent(List rawContent) { return this; } - public EntryBuilder overrides(List overrides) { - this.overrides = overrides; - return this; - } - public EntryBuilder entityType(EntityType entityType) { this.entityType = entityType; return this; @@ -186,7 +149,7 @@ public EntryBuilder componentName(String componentName) { } public Entry build() { - return new Entry(recommendation, overrides, inputs, path, rawContent, entityType, componentName); + return new Entry(inputs, path, rawContent, entityType, componentName); } } } diff --git a/core/src/main/java/com/salesforce/slds/shared/models/core/RuleSet.java b/core/src/main/java/com/salesforce/slds/shared/models/core/RuleSet.java index 909a49e..4e9314a 100644 --- a/core/src/main/java/com/salesforce/slds/shared/models/core/RuleSet.java +++ b/core/src/main/java/com/salesforce/slds/shared/models/core/RuleSet.java @@ -31,6 +31,7 @@ public class RuleSet extends Input implements Comparable, RangeProvider private final Range range; private final List raw; private final List