1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-24 18:47:20 +00:00
TiddlyWiki5/editions/highlightdemo/tiddlers/HighlightExample.tid
Jermolene ecba4f71ea Clean up the highlight plugin
Fixing various issues that were preventing language specifiers from
working.
2014-02-10 13:51:38 +00:00

52 lines
795 B
Plaintext

title: HighlightExample
''Javascript'' code:
```javascript
(function(a,b){
var result = a+b;
return result;
})(10,20)
```
''CSS'' code:
```css
* { margin: 0; padding: 0; } /* micro reset */
html { font-size: 62.5%; }
body { font-size: 14px; font-size: 1.4rem; } /* =14px */
h1 { font-size: 24px; font-size: 2.4rem; } /* =24px */
```
''Perl'' code:
```perl
package Name;
my $singleton;
BEGIN {
$singleton = {
attribute => 'value',
another => 'something',
};
bless $singleton, "Name";
}
sub new {
my $class = shift;
return $singleton;
}
```
''Python'' code:
```python
class Singleton:
__single = None
def __init__( self ):
if Singleton.__single:
raise Singleton.__single
Singleton.__single = self
```