mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-28 11:58:23 +01:00
Minor tweaks
This commit is contained in:
parent
8423a18071
commit
209a874f57
@ -83,7 +83,7 @@ public class SpoilerParserPlugin extends AbstractMarkwonPlugin {
|
|||||||
for (CodeSpan codeSpan : codeSpans) {
|
for (CodeSpan codeSpan : codeSpans) {
|
||||||
int spanBeginning = markdownStringBuilder.getSpanStart(codeSpan);
|
int spanBeginning = markdownStringBuilder.getSpanStart(codeSpan);
|
||||||
int spanEnd = markdownStringBuilder.getSpanEnd(codeSpan);
|
int spanEnd = markdownStringBuilder.getSpanEnd(codeSpan);
|
||||||
if (spoilerStart < spanBeginning && spanEnd < spoilerEnd) {
|
if (spoilerStart + 2 <= spanBeginning && spanEnd <= spoilerEnd + 2) {
|
||||||
markdownStringBuilder.delete(spoilerStart, spoilerStart + 2);
|
markdownStringBuilder.delete(spoilerStart, spoilerStart + 2);
|
||||||
markdownStringBuilder.delete(spoilerEnd, spoilerEnd + 2);
|
markdownStringBuilder.delete(spoilerEnd, spoilerEnd + 2);
|
||||||
SpoilerSpan spoilerSpan = new SpoilerSpan(textColor, backgroundColor);
|
SpoilerSpan spoilerSpan = new SpoilerSpan(textColor, backgroundColor);
|
||||||
@ -97,7 +97,7 @@ public class SpoilerParserPlugin extends AbstractMarkwonPlugin {
|
|||||||
for (CodeBlockSpan codeBlockSpan : codeBlockSpans) {
|
for (CodeBlockSpan codeBlockSpan : codeBlockSpans) {
|
||||||
int spanBeginning = markdownStringBuilder.getSpanStart(codeBlockSpan);
|
int spanBeginning = markdownStringBuilder.getSpanStart(codeBlockSpan);
|
||||||
int spanEnd = markdownStringBuilder.getSpanEnd(codeBlockSpan);
|
int spanEnd = markdownStringBuilder.getSpanEnd(codeBlockSpan);
|
||||||
if (spoilerStart < spanBeginning && spanEnd < spoilerEnd) {
|
if (spoilerStart + 2 <= spanBeginning && spanEnd <= spoilerEnd + 2) {
|
||||||
markdownStringBuilder.delete(spoilerStart, spoilerStart + 2);
|
markdownStringBuilder.delete(spoilerStart, spoilerStart + 2);
|
||||||
markdownStringBuilder.delete(spoilerEnd, spoilerEnd + 2);
|
markdownStringBuilder.delete(spoilerEnd, spoilerEnd + 2);
|
||||||
SpoilerSpan spoilerSpan = new SpoilerSpan(textColor, backgroundColor);
|
SpoilerSpan spoilerSpan = new SpoilerSpan(textColor, backgroundColor);
|
||||||
|
Loading…
Reference in New Issue
Block a user