projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
🔀 Merge branch 'master' into next
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
template
/
ImageLinkFilter.java
diff --git
a/src/main/java/net/pterodactylus/sone/template/ImageLinkFilter.java
b/src/main/java/net/pterodactylus/sone/template/ImageLinkFilter.java
index
4742ae3
..
85a7562
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/template/ImageLinkFilter.java
+++ b/
src/main/java/net/pterodactylus/sone/template/ImageLinkFilter.java
@@
-1,5
+1,5
@@
/*
/*
- * Sone - ImageLinkFilter.java - Copyright © 2011–20
16
David Roden
+ * Sone - ImageLinkFilter.java - Copyright © 2011–20
20
David Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@
-28,6
+28,7
@@
import java.util.Map;
import net.pterodactylus.sone.core.Core;
import net.pterodactylus.sone.data.Image;
import net.pterodactylus.util.template.Filter;
import net.pterodactylus.sone.core.Core;
import net.pterodactylus.sone.data.Image;
import net.pterodactylus.util.template.Filter;
+import net.pterodactylus.util.template.HtmlFilter;
import net.pterodactylus.util.template.Template;
import net.pterodactylus.util.template.TemplateContext;
import net.pterodactylus.util.template.TemplateContextFactory;
import net.pterodactylus.util.template.Template;
import net.pterodactylus.util.template.TemplateContext;
import net.pterodactylus.util.template.TemplateContextFactory;
@@
-49,19
+50,12
@@
public class ImageLinkFilter implements Filter {
private final Core core;
/** The template context factory. */
private final Core core;
/** The template context factory. */
- private final TemplateContextFactory templateContextFactory;
+ private final TemplateContextFactory templateContextFactory
= new TemplateContextFactory()
;
- /**
- * Creates a new image link filter.
- *
- * @param core
- * The core
- * @param templateContextFactory
- * The template context factory
- */
- public ImageLinkFilter(Core core, TemplateContextFactory templateContextFactory) {
+ public ImageLinkFilter(Core core) {
this.core = core;
this.core = core;
- this.templateContextFactory = templateContextFactory;
+ templateContextFactory.addFilter("html", new HtmlFilter());
+ templateContextFactory.addFilter("css", new CssClassNameFilter());
}
/**
}
/**