|
1 | | - r←level CollectScript(ref name parms collect i);body;no;caption |
| 1 | + r←level CollectScript(ref name parms collect i);body;no;caption;target |
2 | 2 | r←'' |
3 | 3 | :If 2=≡body←ref.⎕SRC ref.⍎name |
4 | 4 | body←(,¨'<>&')⎕R'\<' '\>' '\&'⍠('Greedy' 0)⊣body |
5 | 5 | no←⍕2+level |
6 | | - r,←⊂'<div ',(collect MakeID(⍕ref),'.',name),'>' |
| 6 | + r,←⊂'<div class="bookmarktarget" ',(collect MakeID(⍕ref),'.',name),'>' |
| 7 | + r,←⊂'<div id="',(GetBookmark_ID parms),'" class="code_block">' |
7 | 8 | caption←MakeBreadCrumb collect.remove RemoveLevels⍕ref |
8 | | - r,←⊂'<p class="caption">',(⍕i),'. ',caption,'.',name,'</p>' |
9 | | - r,←⊂'</div>' |
| 9 | + r,←⊂'<button title="Hide" class="accordion expanded">Hide</button>' |
| 10 | + target←'bookmark_',¯5↑'00000',⍕parms.bookmarkCounter-1 |
| 11 | + r,←⊂'<button title="Brings previous object to the top" onClick="jump2bookmark(''',target,''')">Previous</button>' |
| 12 | + target←'bookmark_',¯5↑'00000',⍕parms.bookmarkCounter+1 |
| 13 | + r,←⊂'<button title="Brings next object to the top" onClick="jump2bookmark(''',target,''')">Next</button>' |
| 14 | + r,←⊂'<p class="caption">',(⍕i),'. ',caption,'.',name,' (',(⍕≢body),' lines)</p>' |
| 15 | + r,←⊂'<div class="accordion-content">' |
10 | 16 | body←({(3+⍴,⍕⍵){⍺↑'[',(⍕⍵),']'}¨¯1+⍳⍵}⍴body),¨body |
11 | 17 | (1⊃body)←'<pre><code>',1⊃body |
12 | 18 | r,←body,⊂'</code></pre>' |
| 19 | + r,←'</div>' '</div>' '</div>' |
| 20 | + IncrementBookMarkCounter parms |
13 | 21 | :EndIf |
14 | 22 | ⍝Done |
0 commit comments