diff --git a/index.js b/index.js index dd50fbd..8e11860 100644 --- a/index.js +++ b/index.js @@ -279,7 +279,7 @@ function convertHTMLtoJSON(html) { curSectionData.code = $section(this).html().replace(/^\s+|\s+$/g, ''); }); - curSectionData.markup = hl.highlightAuto(curSectionData.code).value; + curSectionData.markup = hl.highlight("html", curSectionData.code).value; curSectionData.id = makeUrlSafe(curSectionData.section + '-' + curSectionData.heading); $section('h1.main-section-' + sgUniqueIdentifier).remove(); diff --git a/template/template.html b/template/template.html index 8b0e2c0..2c1c9a7 100644 --- a/template/template.html +++ b/template/template.html @@ -1,44 +1,6 @@ + {{> theme}} {{> highlight}} -{{> jquery}} - - -
{{/each}} - \ No newline at end of file + +{{> jquery}} + diff --git a/template/theme.css b/template/theme.css index e96dd6f..9b3f153 100644 --- a/template/theme.css +++ b/template/theme.css @@ -11,7 +11,7 @@ box-shadow: 2px 2px 5px 0px rgba(50, 50, 50, 0.43); } -#styleguide .result, +#styleguide .result, #styleguide .comment { padding: 1em; border: 1px solid #ddd; @@ -33,7 +33,20 @@ #styleguide .markup { border: 1px solid #ddd; - border-top: none; + border-top: none; +} + +#styleguide .markup pre { + overflow: auto; + padding: 0; + width: 100%; +} + +#styleguide .markup code { + display: block; + word-wrap: normal; + white-space: pre; + padding: 1em; } #styleguide code, @@ -120,4 +133,3 @@ #styleguide-menu a.on { background-color: rgba(0, 0, 0, 0.1); } -