Matcher matcher = urlMatcher.matcher(token.text); if (matcher.find()) { parsedCss.add(new ImportDecl(matcher.group(2).trim()));
Matcher matcher = urlMatcher.matcher(token.text); if (matcher.find()) { parsedCss.add(new ImportDecl(matcher.group(2).trim()));
Matcher matcher = urlMatcher.matcher(token.text); if (matcher.find()) { parsedCss.add(new ImportDecl(matcher.group(2).trim()));
public List<Object> parse(String content) throws GadgetException { List<Object> parsedCss = null; boolean shouldCache = shouldCache(); String key = null; if (shouldCache) { // TODO - Consider using the source if its under a certain size key = HashUtil.checksum(content.getBytes()); parsedCss = parsedCssCache.getElement(key); } if (parsedCss == null) { parsedCss = parseImpl(content); if (shouldCache) { parsedCssCache.addElement(key, parsedCss); } } if (shouldCache) { List<Object> cloned = Lists.newArrayListWithCapacity(parsedCss.size()); for (Object o : parsedCss) { if (o instanceof ImportDecl) { cloned.add(new ImportDecl(((ImportDecl) o).getUri())); } else if (o instanceof UriDecl) { cloned.add(new UriDecl(((UriDecl) o).getUri())); } else { cloned.add(o); } } return cloned; } return parsedCss; }
public List<Object> parse(String content) throws GadgetException { List<Object> parsedCss = null; boolean shouldCache = shouldCache(); String key = null; if (shouldCache) { // TODO - Consider using the source if its under a certain size key = HashUtil.checksum(content.getBytes()); parsedCss = parsedCssCache.getElement(key); } if (parsedCss == null) { parsedCss = parseImpl(content); if (shouldCache) { parsedCssCache.addElement(key, parsedCss); } } if (shouldCache) { List<Object> cloned = Lists.newArrayListWithCapacity(parsedCss.size()); for (Object o : parsedCss) { if (o instanceof ImportDecl) { cloned.add(new ImportDecl(((ImportDecl) o).getUri())); } else if (o instanceof UriDecl) { cloned.add(new UriDecl(((UriDecl) o).getUri())); } else { cloned.add(o); } } return cloned; } return parsedCss; }
public List<Object> parse(String content) throws GadgetException { List<Object> parsedCss = null; boolean shouldCache = shouldCache(); String key = null; if (shouldCache) { // TODO - Consider using the source if its under a certain size key = HashUtil.checksum(content.getBytes()); parsedCss = parsedCssCache.getElement(key); } if (parsedCss == null) { parsedCss = parseImpl(content); if (shouldCache) { parsedCssCache.addElement(key, parsedCss); } } if (shouldCache) { List<Object> cloned = Lists.newArrayListWithCapacity(parsedCss.size()); for (Object o : parsedCss) { if (o instanceof ImportDecl) { cloned.add(new ImportDecl(((ImportDecl) o).getUri())); } else if (o instanceof UriDecl) { cloned.add(new UriDecl(((UriDecl) o).getUri())); } else { cloned.add(o); } } return cloned; } return parsedCss; }