File tree Expand file tree Collapse file tree 8 files changed +29
-31
lines changed
Expand file tree Collapse file tree 8 files changed +29
-31
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ We assume the pseudocode to be rendered is in a `<pre>` DOM element.
9090Here is an example that illustrates a quicksort algorithm:
9191
9292``` html
93- <pre id =" quicksort" class =" pseudocode" style = " display : hidden ; " >
93+ <pre id =" quicksort" class =" pseudocode" >
9494 % This quicksort algorithm is extracted from Chapter 7, Introduction to Algorithms (3rd edition)
9595 \begin{algorithm}
9696 \caption{Quicksort}
@@ -285,7 +285,7 @@ on the `<pre>` DOM element.
285285The following example demonstrates how to enable line numbers and change title prefix:
286286
287287``` html
288- <pre id =" quicksort" class =" pseudocode" style = " display : hidden ; "
288+ <pre id =" quicksort" class =" pseudocode"
289289 data-line-number =true data-title-prefix =" Algo" >
290290 ...
291291</pre >
Original file line number Diff line number Diff line change @@ -222,7 +222,7 @@ <h3>Usage</h3>
222222
223223 < p > Place the pseudocode to be rendered in a < code > <pre></ code > element:</ p >
224224
225- < pre > < code class ="language-html "> <pre id="hello-world-code" style="display:hidden;" >
225+ < pre > < code class ="language-html "> <pre id="hello-world-code">
226226 \begin{algorithmic}
227227 \PRINT \texttt{'hello world'}
228228 \end{algorithmic}
Original file line number Diff line number Diff line change 1717</ head >
1818
1919< body >
20- < pre id ="test-basics " style =" display:none " data-line-number =true >
20+ < pre id ="test-basics " data-line-number =true >
2121 \begin{algorithm}
2222 \caption{Test text-style}
2323 \begin{algorithmic}
5858 \END{ALGORITHMIC}
5959 \END{ALGORITHM}
6060 </ pre >
61- < pre id ="test-codes " style =" display:none " >
61+ < pre id ="test-codes ">
6262 \begin{algorithm}
6363 \caption{Test control blocks}
6464 \begin{algorithmic}
141141 \end{algorithmic}
142142 \end{algorithm}
143143 </ pre >
144- < pre id ="test-examples " style =" display:none " data-title-prefix ="Procedure ">
144+ < pre id ="test-examples " data-title-prefix ="Procedure ">
145145 % This quicksort algorithm is extracted from Chapter 7, Introduction
146146 % to Algorithms (3rd edition)
147147 \begin{algorithm}
169169 \end{algorithmic}
170170 \end{algorithm}
171171 </ pre >
172- < pre id ="test-examples-custom-title " style =" display:none " >
172+ < pre id ="test-examples-custom-title ">
173173 % This quicksort algorithm is extracted from Chapter 7, Introduction
174174 % to Algorithms (3rd edition)
175175 \begin{algorithm}
197197 \end{algorithmic}
198198 \end{algorithm}
199199 </ pre >
200- < pre id ="scopeline-euclid " style =" display:none " >
200+ < pre id ="scopeline-euclid ">
201201 \begin{algorithm}
202202 \caption{Classical Euclidean Algorithm}
203203 \begin{algorithmic}
214214 \end{algorithmic}
215215 \end{algorithm}
216216 </ pre >
217- < pre id ="scopeline-dbscan " style =" display:none " >
217+ < pre id ="scopeline-dbscan ">
218218 \begin{algorithm}
219219 \caption{DBSCAN}
220220 \begin{algorithmic}
Original file line number Diff line number Diff line change 2828</ head >
2929
3030< body >
31- < pre id ="test-basics " style =" display:none " data-line-number =true >
31+ < pre id ="test-basics " data-line-number =true >
3232 \begin{algorithm}
3333 \caption{Test text-style}
3434 \begin{algorithmic}
6969 \END{ALGORITHMIC}
7070 \END{ALGORITHM}
7171 </ pre >
72- < pre id ="test-codes " style =" display:none " >
72+ < pre id ="test-codes ">
7373 \begin{algorithm}
7474 \caption{Test control blocks}
7575 \begin{algorithmic}
152152 \end{algorithmic}
153153 \end{algorithm}
154154 </ pre >
155- < pre id ="test-examples " style =" display:none " data-title-prefix ="Procedure ">
155+ < pre id ="test-examples " data-title-prefix ="Procedure ">
156156 % This quicksort algorithm is extracted from Chapter 7, Introduction
157157 % to Algorithms (3rd edition)
158158 \begin{algorithm}
180180 \end{algorithmic}
181181 \end{algorithm}
182182 </ pre >
183- < pre id ="test-examples-custom-title " style =" display:none " >
183+ < pre id ="test-examples-custom-title ">
184184 % This quicksort algorithm is extracted from Chapter 7, Introduction
185185 % to Algorithms (3rd edition)
186186 \begin{algorithm}
208208 \end{algorithmic}
209209 \end{algorithm}
210210 </ pre >
211- < pre id ="scopeline-euclid " style =" display:none " >
211+ < pre id ="scopeline-euclid ">
212212 \begin{algorithm}
213213 \caption{Classical Euclidean Algorithm}
214214 \begin{algorithmic}
225225 \end{algorithmic}
226226 \end{algorithm}
227227 </ pre >
228- < pre id ="scopeline-dbscan " style =" display:none " >
228+ < pre id ="scopeline-dbscan ">
229229 \begin{algorithm}
230230 \caption{DBSCAN}
231231 \begin{algorithmic}
Original file line number Diff line number Diff line change 2727</ head >
2828
2929< body >
30- < pre id ="test-basics " style =" display:none " data-line-number =true >
30+ < pre id ="test-basics " data-line-number =true >
3131 \begin{algorithm}
3232 \caption{Test text-style}
3333 \begin{algorithmic}
6868 \END{ALGORITHMIC}
6969 \END{ALGORITHM}
7070 </ pre >
71- < pre id ="test-codes " style =" display:none " >
71+ < pre id ="test-codes ">
7272 \begin{algorithm}
7373 \caption{Test control blocks}
7474 \begin{algorithmic}
151151 \end{algorithmic}
152152 \end{algorithm}
153153 </ pre >
154- < pre id ="test-examples " style =" display:none " data-title-prefix ="Procedure ">
154+ < pre id ="test-examples " data-title-prefix ="Procedure ">
155155 % This quicksort algorithm is extracted from Chapter 7, Introduction
156156 % to Algorithms (3rd edition)
157157 \begin{algorithm}
179179 \end{algorithmic}
180180 \end{algorithm}
181181 </ pre >
182- < pre id ="test-examples-custom-title " style =" display:none " >
182+ < pre id ="test-examples-custom-title ">
183183 % This quicksort algorithm is extracted from Chapter 7, Introduction
184184 % to Algorithms (3rd edition)
185185 \begin{algorithm}
207207 \end{algorithmic}
208208 \end{algorithm}
209209 </ pre >
210- < pre id ="scopeline-euclid " style =" display:none " >
210+ < pre id ="scopeline-euclid ">
211211 \begin{algorithm}
212212 \caption{Classical Euclidean Algorithm}
213213 \begin{algorithmic}
224224 \end{algorithmic}
225225 \end{algorithm}
226226 </ pre >
227- < pre id ="scopeline-dbscan " style =" display:none " >
227+ < pre id ="scopeline-dbscan ">
228228 \begin{algorithm}
229229 \caption{DBSCAN}
230230 \begin{algorithmic}
Original file line number Diff line number Diff line change @@ -62,9 +62,7 @@ module.exports = {
6262 renderClass : function ( className , options ) {
6363 [ ] . forEach . call (
6464 document . getElementsByClassName ( className ) ,
65- function ( el ) {
66- this . renderElement ( el , options ) ;
67- }
65+ ( el ) => this . renderElement ( el , options )
6866 ) ;
6967 } ,
7068} ;
Original file line number Diff line number Diff line change 11</head>
22
33<body>
4- <pre id="test-basics" style="display:none" data-line-number=true>
4+ <pre id="test-basics" data-line-number=true>
55 \begin{algorithm}
66 \caption{Test text-style}
77 \begin{algorithmic}
4242 \END{ALGORITHMIC}
4343 \END{ALGORITHM}
4444 </pre>
45- <pre id="test-codes" style="display:none" >
45+ <pre id="test-codes">
4646 \begin{algorithm}
4747 \caption{Test control blocks}
4848 \begin{algorithmic}
125125 \end{algorithmic}
126126 \end{algorithm}
127127 </pre>
128- <pre id="test-examples" style="display:none" data-title-prefix="Procedure">
128+ <pre id="test-examples" data-title-prefix="Procedure">
129129 % This quicksort algorithm is extracted from Chapter 7, Introduction
130130 % to Algorithms (3rd edition)
131131 \begin{algorithm}
153153 \end{algorithmic}
154154 \end{algorithm}
155155 </pre>
156- <pre id="test-examples-custom-title" style="display:none" >
156+ <pre id="test-examples-custom-title">
157157 % This quicksort algorithm is extracted from Chapter 7, Introduction
158158 % to Algorithms (3rd edition)
159159 \begin{algorithm}
181181 \end{algorithmic}
182182 \end{algorithm}
183183 </pre>
184- <pre id="scopeline-euclid" style="display:none" >
184+ <pre id="scopeline-euclid">
185185 \begin{algorithm}
186186 \caption{Classical Euclidean Algorithm}
187187 \begin{algorithmic}
198198 \end{algorithmic}
199199 \end{algorithm}
200200 </pre>
201- <pre id="scopeline-dbscan" style="display:none" >
201+ <pre id="scopeline-dbscan">
202202 \begin{algorithm}
203203 \caption{DBSCAN}
204204 \begin{algorithmic}
You can’t perform that action at this time.
0 commit comments