Permalink
Browse files

WIP

  • Loading branch information...
1 parent 2d9bb0d commit b64f4d46fb4bdd1b6d41b7b4aedbd3b97674edb5 @mxcl committed Mar 18, 2013
Showing with 85 additions and 14 deletions.
  1. +21 −1 BullScript.JSON-tmLanguage
  2. +45 −1 BullScript.tmLanguage
  3. +19 −12 example.bs
View
@@ -19,8 +19,28 @@
}
]
},
+ { "begin": "<(img)(\\s+)",
+ "end": "(>)",
+ "beginCaptures": {
+ "0": { "name": "entity.name.tag.html" }
+ },
+ "endCaptures": {
+ "1": { "name": "entity.name.tag.html" }
+ },
+ "patterns": [
+ { "begin": "#[nNxX]?{",
+ "end": "}",
+ "patterns": [
+ { "include": "$self" }
+ ]
+ },
+ { "match": ".",
+ "name": "entity.name.tag.html"
+ }
+ ]
+ },
{ "begin": "<(\\w+)(\\s+|>)",
- "end": "(\\1>)|\\s*<<",
+ "end": "(\/\\1>)",
"beginCaptures": {
"0": { "name": "entity.name.tag.html" }
},
View
@@ -48,6 +48,50 @@
</dict>
<dict>
<key>begin</key>
+ <string>&lt;(img)(\s+)</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>0</key>
+ <dict>
+ <key>name</key>
+ <string>entity.name.tag.html</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>(&gt;)</string>
+ <key>endCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>entity.name.tag.html</string>
+ </dict>
+ </dict>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>begin</key>
+ <string>#[nNxX]?{</string>
+ <key>end</key>
+ <string>}</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>$self</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>.</string>
+ <key>name</key>
+ <string>entity.name.tag.html</string>
+ </dict>
+ </array>
+ </dict>
+ <dict>
+ <key>begin</key>
<string>&lt;(\w+)(\s+|&gt;)</string>
<key>beginCaptures</key>
<dict>
@@ -58,7 +102,7 @@
</dict>
</dict>
<key>end</key>
- <string>(\1&gt;)|\s*&lt;&lt;</string>
+ <string>(/\1&gt;)</string>
<key>endCaptures</key>
<dict>
<key>1</key>
View
@@ -1,20 +1,27 @@
router.add(function(artist, album, track) {
+ var $s1, $s2;
var $el = <div id="bandrack"></div>;
- var $s1 = <section class="glamourshot"></section>;
- var $s2 = <section class="biography"></section>;
- var $s3 = <section class="discography"></section>;
- $('#content').html($el << $s1 << $s2 << $s3);
+ $el << $s1 = <section class="biography"></section>.click(function() {
+ console.log('Section 1 clicked');
+ })
+ << $s2 = <section class="discography"></section>.click(function() {
+ console.log('Section 2 clicked');
+ });
+
+ $('#content').empty()<< $el;
rackit.ws.read("/artist/#X{artist + 123}", function(info) {
- $s1 << <div class="glamourshot-about">
- <h2>#{info.name}
- <a class="hidden" href="http://musicbrainz.org/artist/#x{mbaid}" target="_blank">mbaid:#{info.mbaid}</a>
- <a class="hidden" href="http://allmusic.com/artist/#x{artist}" target="_blank">allmusic</a>
- </h2>
- </div>
- <div class="genres">
- #{info.genres.join(', ')}
+ $s1 << <div>
+ <div class="glamourshot-about">
+ <h2>#{info.name}
+ <a class="hidden" href="http://musicbrainz.org/artist/#x{mbaid}" target="_blank">mbaid:#{info.mbaid}</a>
+ <a class="hidden" href="http://allmusic.com/artist/#x{artist}" target="_blank">allmusic</a>
+ </h2>
+ </div>
+ <div class="genres">
+ #{info.genres.join(', ')}
+ </div>
</div>;
$s2.html(info.bio);

0 comments on commit b64f4d4

Please sign in to comment.