aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsiddharth <rsiddharth@ninthfloor.org>2013-03-23 18:34:43 +0530
committerrsiddharth <rsiddharth@ninthfloor.org>2013-03-23 18:34:43 +0530
commit5d7578f2181d0c370e51d6e169652fa5e8aa93c4 (patch)
treed3315a476f5892f2b94c506b285fcdf414da56dd
parent5a612c683eb34d0878ec86491556cd8921d63e16 (diff)
downloadscruf-5d7578f2181d0c370e51d6e169652fa5e8aa93c4.tar.gz
scruf-5d7578f2181d0c370e51d6e169652fa5e8aa93c4.tar.bz2
scruf-5d7578f2181d0c370e51d6e169652fa5e8aa93c4.tar.xz
scruf-5d7578f2181d0c370e51d6e169652fa5e8aa93c4.zip
modified: parsers/Images.java (Pattern for image recognition
updated. Now scruf can detect images with png|jpg|jpeg extension)x -------------- This line and the following will be ignored -------------- === modified file 'parsers/Images.java' --- a/parsers/Images.java 2012-11-30 13:18:40 +0000 +++ b/parsers/Images.java 2013-03-23 13:00:50 +0000 @@ -28,7 +28,7 @@ private String openTag = "<img src=\"$1\" alt=\" \\[$"; private String closeTag = " />"; public String parse(String fileContent) { - Pattern pattern = Pattern.compile("\\{\\{(.+?\\.(png|jpg))(\\|(.+?))?\\}\\}", Pattern.DOTALL); + Pattern pattern = Pattern.compile("\\{\\{(.+?\\.(png|jp[e]?g))(\\|(.+?))?\\}\\}", Pattern.DOTALL); Matcher matcher = pattern.matcher(fileContent); StringBuffer sbuffer = new StringBuffer(); StringBuilder replacementString =new StringBuilder();
-rw-r--r--parsers/Images.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/parsers/Images.java b/parsers/Images.java
index 7bbe60a..7969840 100644
--- a/parsers/Images.java
+++ b/parsers/Images.java
@@ -28,7 +28,7 @@ public class Images implements Parser {
private String openTag = "<img src=\"$1\" alt=\" \\[$";
private String closeTag = " />";
public String parse(String fileContent) {
- Pattern pattern = Pattern.compile("\\{\\{(.+?\\.(png|jpg))(\\|(.+?))?\\}\\}", Pattern.DOTALL);
+ Pattern pattern = Pattern.compile("\\{\\{(.+?\\.(png|jp[e]?g))(\\|(.+?))?\\}\\}", Pattern.DOTALL);
Matcher matcher = pattern.matcher(fileContent);
StringBuffer sbuffer = new StringBuffer();
StringBuilder replacementString =new StringBuilder();