Skip to content

Commit f898035

Browse files
committed
remove display:none from examples
applied by js code anyway
1 parent 7eee507 commit f898035

File tree

8 files changed

+29
-31
lines changed

8 files changed

+29
-31
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ We assume the pseudocode to be rendered is in a `<pre>` DOM element.
9090
Here 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.
285285
The 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>

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ <h3>Usage</h3>
222222

223223
<p>Place the pseudocode to be rendered in a <code>&lt;pre&gt;</code> element:</p>
224224

225-
<pre><code class="language-html">&lt;pre id="hello-world-code" style="display:hidden;"&gt;
225+
<pre><code class="language-html">&lt;pre id="hello-world-code"&gt;
226226
\begin{algorithmic}
227227
\PRINT \texttt{'hello world'}
228228
\end{algorithmic}

docs/katex-samples.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
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}
@@ -58,7 +58,7 @@
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}
@@ -141,7 +141,7 @@
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}
@@ -169,7 +169,7 @@
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}
@@ -197,7 +197,7 @@
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}
@@ -214,7 +214,7 @@
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}

docs/mathjax-v2-samples.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
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}
@@ -69,7 +69,7 @@
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}
@@ -152,7 +152,7 @@
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}
@@ -180,7 +180,7 @@
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}
@@ -208,7 +208,7 @@
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}
@@ -225,7 +225,7 @@
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}

docs/mathjax-v3-samples.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
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}
@@ -68,7 +68,7 @@
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}
@@ -151,7 +151,7 @@
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}
@@ -179,7 +179,7 @@
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}
@@ -207,7 +207,7 @@
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}
@@ -224,7 +224,7 @@
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}

docs/pseudocode.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pseudocode.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff 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
};

static/body.html.part

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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}
@@ -42,7 +42,7 @@
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}
@@ -125,7 +125,7 @@
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}
@@ -153,7 +153,7 @@
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}
@@ -181,7 +181,7 @@
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}
@@ -198,7 +198,7 @@
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}

0 commit comments

Comments
 (0)