mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Guides/Fixup
* make preview area of class: text so styles are applied as expected * fix evaluation of Markup h2/h3 attribute toc=false, so headings are excluded from TOC as expected
This commit is contained in:
1
setup/sql/updates/1761148832_01.sql
Normal file
1
setup/sql/updates/1761148832_01.sql
Normal file
@@ -0,0 +1 @@
|
||||
UPDATE `aowow_dbversion` SET `build` = CONCAT(IFNULL(`build`, ''), ' globaljs');
|
||||
@@ -3126,7 +3126,7 @@ var Markup = {
|
||||
str += "<li><b><a href='#guide-changelog' onclick=\"Markup.toggleReveal('changelog');\">Changelog</a></b></li>";
|
||||
lastNode = "h2";
|
||||
}
|
||||
if (node.name == 'h2' && node.attr.toc !== false)
|
||||
if (node.name == 'h2' && node.attr.toc !== 'false')
|
||||
{
|
||||
if (lastNode == 'h3')
|
||||
{
|
||||
@@ -3136,7 +3136,7 @@ var Markup = {
|
||||
str += '<li><b><a href=\'#' + (node.attr.id ? g_urlize(node.attr.id) : g_urlize(node.attr._textContents)) + '\'>' + node.attr._textContents + '</a></b></li>';
|
||||
lastNode = 'h2';
|
||||
}
|
||||
if (node.name == 'h3' && allowH3 && node.attr.toc !== false && (lastNode != '' || nodes.h2.length == 0))
|
||||
if (node.name == 'h3' && allowH3 && node.attr.toc !== 'false' && (lastNode != '' || nodes.h2.length == 0))
|
||||
{
|
||||
if (lastNode == 'h2')
|
||||
{
|
||||
|
||||
@@ -295,7 +295,7 @@ endif;
|
||||
}
|
||||
updateQfPreview();
|
||||
}).bind(this), 50)"><?=Lang::guide('editor', 'autoupdate');?></label></h2>
|
||||
<div id="guide-body"><div id="livePreview" style="margin-right:10px"></div></div>
|
||||
<div id="guide-body" class="text"><div id="livePreview" style="margin-right:10px"></div></div>
|
||||
<script>updatePreview(true);</script>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user