Skip to content

Commit 73dff40

Browse files
committed
Remove unused code
1 parent cbc873f commit 73dff40

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

app/src/main/java/fr/free/nrw/commons/utils/MediaDataExtractorUtil.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,6 @@
88
import java.util.regex.Pattern;
99

1010
public class MediaDataExtractorUtil {
11-
12-
/**
13-
* We could fetch all category links from API, but we actually only want the ones
14-
* directly in the page source so they're editable. In the future this may change.
15-
*
16-
* @param source wikitext source code
17-
*/
18-
public static ArrayList<String> extractCategories(String source) {
19-
ArrayList<String> categories = new ArrayList<>();
20-
Pattern regex = Pattern.compile("\\[\\[\\s*Category\\s*:([^]]*)\\s*\\]\\]", Pattern.CASE_INSENSITIVE);
21-
Matcher matcher = regex.matcher(source);
22-
while (matcher.find()) {
23-
String cat = matcher.group(1).trim();
24-
categories.add(cat);
25-
}
26-
27-
return categories;
28-
}
29-
30-
3111
/**
3212
* Extracts a list of categories from | separated category string
3313
*

0 commit comments

Comments
 (0)