Permalink
Browse files

Fixed example blocks formatting by cleaning <pre> tags.

This shared the same problem as <code> sections - there was starting and trailing space inserted by template.
  • Loading branch information...
tomaz committed Dec 23, 2010
1 parent 43fbdfa commit cf5bb48139dde4c4da760a81be19266878535295
Showing with 2 additions and 0 deletions.
  1. +2 −0 Generating/GBHTMLOutputGenerator.m
@@ -161,6 +161,8 @@ - (NSString *)stringByCleaningHtml:(NSString *)string {
NSString *result = [string stringByReplacingOccurrencesOfString:@" " withString:@" "];
result = [result stringByReplacingOccurrencesOfString:@"<code> " withString:@"<code>"];
result = [result stringByReplacingOccurrencesOfString:@" </code>" withString:@"</code>"];
+ result = [result stringByReplacingOccurrencesOfString:@"<pre> " withString:@"<pre>"];
+ result = [result stringByReplacingOccurrencesOfString:@" </pre>" withString:@"</pre>"];
while (YES) {
NSString *source = [result stringByMatching:@"</code> [],.!?:;'\")}>]"];
if (!source) break;

0 comments on commit cf5bb48

Please sign in to comment.