回答編集履歴

2

再修正

2018/01/18 01:50

投稿

jinshan
jinshan

スコア107

test CHANGED
@@ -56,17 +56,25 @@
56
56
 
57
57
  if (SearchResult2 == 0){
58
58
 
59
+ //1つ前の段落との結合をしてよい場合の例
60
+
59
- //nextElements.merge();//1つ前の段落との結合でよい場合
61
+ //nextElements.merge();
62
+
63
+
64
+
65
+ //1つ前の段落に該当文字を移動してから置換の場合の例
60
66
 
61
67
  body.getChild(i).asText().setText(ElementText + string2);
62
68
 
63
69
  body.getChild(i+1).asText().setText(ElementText2.substr(string2.length));
64
70
 
71
+
72
+
73
+ body.replaceText(string1 + string2, string3);
74
+
65
75
  }
66
76
 
67
77
  }
68
-
69
- body.replaceText(string1 + string2, string3);
70
78
 
71
79
  }
72
80
 

1

rem変更

2018/01/18 01:50

投稿

jinshan
jinshan

スコア107

test CHANGED
@@ -56,7 +56,7 @@
56
56
 
57
57
  if (SearchResult2 == 0){
58
58
 
59
- //nextElements.merge();//1つ前の段落と結合して処理する場合
59
+ //nextElements.merge();//1つ前の段落と結合でよい場合
60
60
 
61
61
  body.getChild(i).asText().setText(ElementText + string2);
62
62