From 805ebbaba56a4b4f57cb4a16a712fdb5bf8aa443 Mon Sep 17 00:00:00 2001 From: Jack Lukic Date: Wed, 29 May 2013 14:14:40 -0400 Subject: [PATCH] fixes issue in displaying some code example without class uI Former-commit-id: 8e054c76568dc5c52263fe137235dd471c2ef740 Former-commit-id: 1eaf30680788b1a0f67270e2510bb0795b1d0e8c --- node/src/documents/elements/button.html | 5 ++--- node/src/documents/elements/icon.html | 4 ++-- node/src/files/javascript/semantic.js | 10 +++++----- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/node/src/documents/elements/button.html b/node/src/documents/elements/button.html index a666ab3e7..d93c9d62f 100755 --- a/node/src/documents/elements/button.html +++ b/node/src/documents/elements/button.html @@ -255,7 +255,7 @@ type : 'UI Element'

Labeled Icon

Groups can be formatted as labeled icons

-
+
Pause
Play
Shuffle
@@ -266,7 +266,7 @@ type : 'UI Element'

Fluid

Groups can be divided evenly to fit parent

-
+
One
Two
Three
@@ -283,7 +283,6 @@ type : 'UI Element'
Two
Three
-
diff --git a/node/src/documents/elements/icon.html b/node/src/documents/elements/icon.html index 54ce476db..8478dcdae 100755 --- a/node/src/documents/elements/icon.html +++ b/node/src/documents/elements/icon.html @@ -251,9 +251,9 @@ type : 'UI Element'

Link

An icon can be formatted as a link

- +
- +
diff --git a/node/src/files/javascript/semantic.js b/node/src/files/javascript/semantic.js index 1db7fe0b1..b1d493976 100755 --- a/node/src/files/javascript/semantic.js +++ b/node/src/files/javascript/semantic.js @@ -112,16 +112,16 @@ semantic.ready = function() { var $example = $(this).closest('.example'), $header = $example.children('.ui.header:first-of-type, p:first-of-type'), - $demo = $example.children().not($header).not('i.code:first-child, .annotated, .ignore'), + $demo = $example.children().not($header).not('i.code:first-child, .annotated, br, .ignore'), $annotated = $example.find('.annotated'), $code = $annotated.find('.code'), whiteSpace = new RegExp('\\n\\s{4}', 'g'), code = '' ; // if ui has wrapper use that - if($demo.filter('.ui').size() === 0) { - $demo = $example.children().eq(3).children(); - } + // if($demo.filter('.ui').size() === 0) { + // $demo = $example.children().eq(3).children(); + // } // add source if doesnt exist and initialize if($annotated.size() === 0) { $annotated = $('
') @@ -132,7 +132,7 @@ semantic.ready = function() { if( $code.size() === 0) { $demo .each(function(){ - if($(this).hasClass('ui')) { + if($(this).not('br')) { code += $(this).get(0).outerHTML + "\n"; } })