@@ -183,55 +183,6 @@ public virtual string Generate()
183
183
return builder . ToString ( ) ;
184
184
}
185
185
186
- public StringBuilder GenerateUnformatted ( )
187
- {
188
- if ( CheckGenerate != null && ! CheckGenerate ( ) )
189
- return new StringBuilder ( 0 ) ;
190
-
191
- if ( Blocks . Count == 0 )
192
- return Text . StringBuilder ;
193
-
194
- var builder = new StringBuilder ( ) ;
195
- Block previousBlock = null ;
196
-
197
- var blockIndex = 0 ;
198
- foreach ( var childBlock in Blocks )
199
- {
200
- var childText = childBlock . GenerateUnformatted ( ) ;
201
-
202
- var nextBlock = ( ++ blockIndex < Blocks . Count )
203
- ? Blocks [ blockIndex ]
204
- : null ;
205
-
206
- if ( nextBlock != null )
207
- {
208
- var nextText = nextBlock . GenerateUnformatted ( ) ;
209
- if ( nextText . Length == 0 &&
210
- childBlock . NewLineKind == NewLineKind . IfNotEmpty )
211
- continue ;
212
- }
213
-
214
- if ( childText . Length == 0 )
215
- continue ;
216
-
217
- if ( previousBlock != null &&
218
- previousBlock . NewLineKind == NewLineKind . BeforeNextBlock )
219
- builder . AppendLine ( ) ;
220
-
221
- builder . Append ( childText ) ;
222
-
223
- if ( childBlock . NewLineKind == NewLineKind . Always )
224
- builder . AppendLine ( ) ;
225
-
226
- previousBlock = childBlock ;
227
- }
228
-
229
- if ( Text . StringBuilder . Length != 0 )
230
- builder . Append ( Text . StringBuilder ) ;
231
-
232
- return builder ;
233
- }
234
-
235
186
public bool IsEmpty
236
187
{
237
188
get
@@ -323,11 +274,6 @@ public virtual string Generate()
323
274
return RootBlock . Generate ( ) ;
324
275
}
325
276
326
- public string GenerateUnformatted ( )
327
- {
328
- return RootBlock . GenerateUnformatted ( ) . ToString ( ) ;
329
- }
330
-
331
277
#region Block helpers
332
278
333
279
public void AddBlock ( Block block )
0 commit comments