Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SA Toc / Anchors Plugin
#56
There seems to be a small bug with detecting the indentation level in the TOC. (Either that, or I am not using the plugin correctlySad).
When the body of the page in which I use SA_Toc has the following succession of headers
H2 H3 H2 H3 H4 H3, I observe the following indentation (the last H3 is indented like the H2s)
H2
 H3
H2
 H3
  H4
H3 (this one is indented as H2)
I have tried this by interspersing those headings with (and without) body text, in various combinations.
There are also problems when heading levels are missing, but it may not be best practice to do that (I disagree, though).

macOS 10.12.5, GS 3.3.13 on a proper server (not localhost/myMac.local of MAMP)
Code:
<div id="tocBox" style="float:right;width:40%;margin-right:0;margin-left:4px;padding:2px; border-width:1px; border-radius:5px;border-color:#CCC;">
    <div style="padding:2px 0 0 3px"><b>TOC</b></div>
    <hr style="background:#CCC;" />
    <div style="padding:0 3px 0 2px;"><b>(% sa_toc %)</b></div>
</div>

<h2>h2</h2><p>hoho</p>
  <h3>h3</h3><p>hihi</p>
  <h3>h3</h3><p>okok</p>
<h2>h2</h2><p>moreok</p>
  <h3>h3</h3><p>blehbleh</p>
   <h4>h4</h4><p>(the anomaly comes next)</p>
<h2>h2</h2><p>bla</p>
  <h3>h3</h3><p>bla</p>
[size=small]
<h2>h2</h2><p>(here is another one:)</p>[/size]

   <h4>h4</h4><p>blablabla</p>
<h1>h1</h1><p>(here is yet another one:)</p>
<h2>h2</h2><p>blablabla</p>
I think I removed all styling that could interfere with dotted lists, divs. (In the above, I used some indentation to sort of suggest what I would expect to happen in the actual rendering).

Can anyone reproduce this problem?
Reply


Messages In This Thread
SA Toc / Anchors Plugin - by shawn_a - 2012-02-24, 12:49:22
RE: SA Toc / Anchors Plugin - by shawn_a - 2012-12-08, 18:38:08
RE: SA Toc / Anchors Plugin - by jeremiah.holder - 2012-12-28, 11:19:03
RE: SA Toc / Anchors Plugin - by vanfruniken - 2017-05-30, 20:24:51
RE: SA Toc / Anchors Plugin - by shawn_a - 2017-05-30, 23:00:36
RE: SA Toc / Anchors Plugin - by shawn_a - 2017-05-31, 00:50:01
RE: SA Toc / Anchors Plugin - by lupon - 2019-05-25, 02:19:13
RE: SA Toc / Anchors Plugin - by Oleg06 - 2023-01-20, 10:15:11
RE: SA Toc / Anchors Plugin - by Oleg06 - 2023-01-20, 21:11:50
RE: SA Toc / Anchors Plugin - by Hypertexter - 2023-05-09, 17:05:50
RE: SA Toc / Anchors Plugin - by multicolor - 2023-05-09, 20:31:17
RE: SA Toc / Anchors Plugin - by Hypertexter - 2023-05-24, 03:20:15
RE: SA Toc / Anchors Plugin - by Hypertexter - 2023-11-22, 01:00:09
RE: SA Toc / Anchors Plugin - by Knobbles - 2023-11-25, 03:28:09
RE: SA Toc / Anchors Plugin - by Hypertexter - 2023-11-28, 19:32:49
SA Toc / Anchors Plugin - by Oleg06 - 2012-02-25, 02:05:16
SA Toc / Anchors Plugin - by shawn_a - 2012-02-25, 02:10:04
SA Toc / Anchors Plugin - by shawn_a - 2012-02-25, 02:38:08
SA Toc / Anchors Plugin - by Oleg06 - 2012-02-25, 21:26:00
SA Toc / Anchors Plugin - by shawn_a - 2012-02-26, 04:17:01
SA Toc / Anchors Plugin - by Oleg06 - 2012-02-26, 20:51:13
SA Toc / Anchors Plugin - by shawn_a - 2012-02-27, 00:11:03
SA Toc / Anchors Plugin - by shawn_a - 2012-02-27, 02:57:07
SA Toc / Anchors Plugin - by ren! - 2012-03-20, 01:11:26
SA Toc / Anchors Plugin - by shawn_a - 2012-03-23, 00:20:54
SA Toc / Anchors Plugin - by ren! - 2012-03-24, 00:32:08
SA Toc / Anchors Plugin - by shawn_a - 2012-03-24, 03:34:43
SA Toc / Anchors Plugin - by ren! - 2012-03-26, 00:26:13
SA Toc / Anchors Plugin - by shawn_a - 2012-03-26, 03:35:08
SA Toc / Anchors Plugin - by surasshu - 2012-04-14, 09:41:45
SA Toc / Anchors Plugin - by shawn_a - 2012-04-14, 10:28:10
SA Toc / Anchors Plugin - by surasshu - 2012-04-14, 11:11:17
SA Toc / Anchors Plugin - by shawn_a - 2012-04-16, 00:34:42
SA Toc / Anchors Plugin - by shawn_a - 2012-04-16, 01:02:43
SA Toc / Anchors Plugin - by surasshu - 2012-04-16, 02:41:19
SA Toc / Anchors Plugin - by shawn_a - 2012-04-16, 08:19:56
SA Toc / Anchors Plugin - by surasshu - 2012-04-16, 10:04:54
SA Toc / Anchors Plugin - by shawn_a - 2012-04-16, 10:18:01
SA Toc / Anchors Plugin - by surasshu - 2012-04-16, 10:25:24
SA Toc / Anchors Plugin - by shawn_a - 2012-04-16, 11:29:46
SA Toc / Anchors Plugin - by surasshu - 2012-04-16, 13:35:19
SA Toc / Anchors Plugin - by shawn_a - 2012-04-16, 21:54:07
SA Toc / Anchors Plugin - by shawn_a - 2012-04-17, 02:48:17
SA Toc / Anchors Plugin - by surasshu - 2012-04-17, 14:32:02
SA Toc / Anchors Plugin - by shawn_a - 2012-04-20, 22:50:29
SA Toc / Anchors Plugin - by morvy - 2012-05-16, 23:42:37
SA Toc / Anchors Plugin - by shawn_a - 2012-05-17, 00:00:10
SA Toc / Anchors Plugin - by morvy - 2012-05-17, 00:11:58
SA Toc / Anchors Plugin - by morvy - 2012-06-01, 00:13:19
SA Toc / Anchors Plugin - by shawn_a - 2012-06-01, 06:38:57
SA Toc / Anchors Plugin - by morvy - 2012-06-01, 17:38:18
SA Toc / Anchors Plugin - by shawn_a - 2012-06-01, 23:15:56
SA Toc / Anchors Plugin - by yojoe - 2012-08-01, 18:42:34
SA Toc / Anchors Plugin - by shawn_a - 2012-08-01, 21:47:36
SA Toc / Anchors Plugin - by yojoe - 2012-08-01, 23:53:43
SA Toc / Anchors Plugin - by yojoe - 2012-08-13, 19:17:45
SA Toc / Anchors Plugin - by shawn_a - 2012-08-14, 02:41:56
SA Toc / Anchors Plugin - by yojoe - 2012-08-14, 03:26:30
SA Toc / Anchors Plugin - by shawn_a - 2012-08-14, 04:54:11
SA Toc / Anchors Plugin - by yojoe - 2012-08-14, 05:10:53
SA Toc / Anchors Plugin - by mvlcek - 2012-08-14, 05:53:50
SA Toc / Anchors Plugin - by yojoe - 2012-08-14, 06:56:05
SA Toc / Anchors Plugin - by shawn_a - 2012-08-14, 08:02:42
SA Toc / Anchors Plugin - by mvlcek - 2012-08-14, 15:57:00
SA Toc / Anchors Plugin - by shawn_a - 2012-08-14, 23:34:55
SA Toc / Anchors Plugin - by annathecrow - 2012-08-21, 20:48:50
SA Toc / Anchors Plugin - by yojoe - 2012-10-03, 00:53:10



Users browsing this thread: 1 Guest(s)