OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 // Code shared between the different client-side libraries. | 5 // Code shared between the different client-side libraries. |
6 | 6 |
7 /** | 7 /** |
8 * Finds all code blocks and makes them toggleable. Syntax highlights each | 8 * Finds all code blocks and makes them toggleable. Syntax highlights each |
9 * code block the first time it's shown. | 9 * code block the first time it's shown. |
10 */ | 10 */ |
11 enableCodeBlocks() { | 11 enableCodeBlocks() { |
(...skipping 12 matching lines...) Expand all Loading... |
24 // Syntax highlight. | 24 // Syntax highlight. |
25 if (!pre.classes.contains('formatted')) { | 25 if (!pre.classes.contains('formatted')) { |
26 pre.innerHTML = classifySource(new frog.SourceFile('', pre.text)); | 26 pre.innerHTML = classifySource(new frog.SourceFile('', pre.text)); |
27 pre.classes.add('formatted'); | 27 pre.classes.add('formatted'); |
28 }; | 28 }; |
29 pre.classes.add('expanded'); | 29 pre.classes.add('expanded'); |
30 } | 30 } |
31 }); | 31 }); |
32 } | 32 } |
33 } | 33 } |
OLD | NEW |