@@ -61,8 +61,11 @@ public void FormatSelectedCode_AllSelected()
61
61
62
62
HighLightSection config = configuration . GetSection ( "HighLightSection" ) as HighLightSection ;
63
63
64
+ bool selectedTextFormated = false ;
65
+ addIn . GetSelectedText ( Resource1 . Page2 , out selectedTextFormated ) ;
64
66
65
- XDocument output = addIn . InsertHighLightCode ( htmlCode , pos , param , outline , config , false , false ) ;
67
+
68
+ XDocument output = addIn . InsertHighLightCode ( htmlCode , pos , param , outline , config , selectedTextFormated , addIn . IsSelectedTextInline ( Resource1 . Page2 ) ) ;
66
69
67
70
Assert . AreEqual ( Resource1 . Output2 , output . ToString ( ) , false ) ;
68
71
}
@@ -90,8 +93,11 @@ public void FormatSelectedCode_WordSelected()
90
93
91
94
HighLightSection config = configuration . GetSection ( "HighLightSection" ) as HighLightSection ;
92
95
96
+ bool selectedTextFormated = false ;
97
+ addIn . GetSelectedText ( Resource1 . Page5 , out selectedTextFormated ) ;
93
98
94
- XDocument output = addIn . InsertHighLightCode ( htmlCode , pos , param , outline , config , false , true ) ;
99
+
100
+ XDocument output = addIn . InsertHighLightCode ( htmlCode , pos , param , outline , config , selectedTextFormated , addIn . IsSelectedTextInline ( Resource1 . Page5 ) ) ;
95
101
96
102
Assert . AreEqual ( Resource1 . Output5 , output . ToString ( ) , false ) ;
97
103
}
@@ -119,8 +125,11 @@ public void FormatSelectedCode_LineSelected()
119
125
120
126
HighLightSection config = configuration . GetSection ( "HighLightSection" ) as HighLightSection ;
121
127
128
+ bool selectedTextFormated = false ;
129
+ addIn . GetSelectedText ( Resource1 . Page3 , out selectedTextFormated ) ;
122
130
123
- XDocument output = addIn . InsertHighLightCode ( htmlCode , pos , param , outline , config , false , false ) ;
131
+
132
+ XDocument output = addIn . InsertHighLightCode ( htmlCode , pos , param , outline , config , selectedTextFormated , addIn . IsSelectedTextInline ( Resource1 . Page3 ) ) ;
124
133
125
134
Assert . AreEqual ( Resource1 . Output3 , output . ToString ( ) , false ) ;
126
135
}
@@ -148,8 +157,11 @@ public void FormatSelectedCode_PartialLineSelected()
148
157
149
158
HighLightSection config = configuration . GetSection ( "HighLightSection" ) as HighLightSection ;
150
159
160
+ bool selectedTextFormated = false ;
161
+ addIn . GetSelectedText ( Resource1 . Page6 , out selectedTextFormated ) ;
162
+
151
163
152
- XDocument output = addIn . InsertHighLightCode ( htmlCode , pos , param , outline , config , false , true ) ;
164
+ XDocument output = addIn . InsertHighLightCode ( htmlCode , pos , param , outline , config , selectedTextFormated , addIn . IsSelectedTextInline ( Resource1 . Page6 ) ) ;
153
165
154
166
Assert . AreEqual ( Resource1 . Output6 , output . ToString ( ) , false ) ;
155
167
}
@@ -177,8 +189,11 @@ public void EditFormattedCode_OutlineSelected()
177
189
178
190
HighLightSection config = configuration . GetSection ( "HighLightSection" ) as HighLightSection ;
179
191
192
+ bool selectedTextFormated = false ;
193
+ addIn . GetSelectedText ( Resource1 . Page4 , out selectedTextFormated ) ;
194
+
180
195
181
- XDocument output = addIn . InsertHighLightCode ( htmlCode , pos , param , outline , config , true , false ) ;
196
+ XDocument output = addIn . InsertHighLightCode ( htmlCode , pos , param , outline , config , selectedTextFormated , addIn . IsSelectedTextInline ( Resource1 . Page4 ) ) ;
182
197
183
198
Assert . AreEqual ( Resource1 . Output4 , output . ToString ( ) , false ) ;
184
199
}
0 commit comments