Skip to content

Commit

Permalink
CW#534: Remove "border" even if it's before frame/thumb
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas authored and Nicolas committed Oct 3, 2020
1 parent 4e38042 commit 84f0db0
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -161,7 +161,7 @@ public static AutomaticReplacement suggestReplacement(
}

// Check that the suggestion can be applied
if (replacement.targetMagicWord != null){
if (replacement.targetMagicWord != null) {
String mwName = replacement.targetMagicWord;
boolean paramFound = false;
for (Parameter paramTmp : params) {
Expand Down Expand Up @@ -603,7 +603,12 @@ public boolean analyze(
} else
if (MagicWord.IMG_FRAMED.equals(mwName) ||
MagicWord.IMG_THUMBNAIL.equals(mwName)) {
paramsFormat.add(param);
if (paramsFormat.isEmpty() ||
!MagicWord.IMG_BORDER.equals(paramsFormat.get(paramsFormat.size() - 1).getMagicWord().getName())) {
paramsFormat.add(param);
} else {
paramsFormat.add(paramsFormat.size() - 1, param);
}
} else
// Horizontal alignment option: one of left, right, center, none
if (MagicWord.IMG_CENTER.equals(mwName) ||
Expand Down

0 comments on commit 84f0db0

Please sign in to comment.