aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/com/juick/MessageTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/com/juick/MessageTest.java')
-rw-r--r--src/test/java/com/juick/MessageTest.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/java/com/juick/MessageTest.java b/src/test/java/com/juick/MessageTest.java
index 4c37a678..2d12a3df 100644
--- a/src/test/java/com/juick/MessageTest.java
+++ b/src/test/java/com/juick/MessageTest.java
@@ -20,6 +20,8 @@ package com.juick;
import com.juick.model.Entity;
import com.juick.test.util.MockUtils;
import com.juick.util.MessageUtils;
+import com.overzealous.remark.Options;
+import com.overzealous.remark.Remark;
import org.apache.commons.lang3.RandomUtils;
import org.apache.commons.lang3.StringUtils;
import org.junit.Test;
@@ -196,4 +198,12 @@ public class MessageTest {
assertThat(yo.getStart(), is(0));
assertThat(yo.getEnd(), is(7));
}
+ @Test
+ public void ActivityStreamsHTMLtoMarkdownTest() {
+ String text = "<p><span class=\"h-card\"><a href=\"https://juick.com/stanislavv/\" class=\"u-url mention\">@<span>stanislavv</span></a></span> я в <span class=\"h-card\"><a href=\"https://mastodonsocial.ru/@rf\" class=\"u-url mention\">@<span>rf</span></a></span> выкладывал =)</p>";
+ Options options = new Options();
+ options.inlineLinks = true;
+ Remark remark = new Remark(options);
+ String parsed = remark.convertFragment(text);
+ }
}