Skip to content

Commit 3ddc5cf

Browse files
committed
style: Improve code block readability and formatting
- Add white-space: pre to prevent text wrapping - Reduce font size to 0.9rem for better fit - Improve line height to 1.4 for readability - Format TOML patterns with proper indentation: - Arrays on separate lines with proper indentation - Each pattern on its own line - Clean, readable structure - Format JSONL example with proper indentation: - Nested objects properly indented - Each property on separate line - Much more readable than minified JSON - All code blocks now display properly without wrapping - Maintains aesthetic appeal while improving readability
1 parent 39c5db4 commit 3ddc5cf

File tree

1 file changed

+31
-6
lines changed

1 file changed

+31
-6
lines changed

static/index.html

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,12 @@
7474
padding: 1.5rem;
7575
border-radius: 6px;
7676
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
77-
font-size: 1rem;
77+
font-size: 0.9rem;
7878
margin: 1rem 0;
7979
overflow-x: auto;
8080
position: relative;
81+
white-space: pre;
82+
line-height: 1.4;
8183
}
8284

8385
.copy-btn {
@@ -200,7 +202,19 @@ <h4>Table Format (Default)</h4>
200202
<div class="output-section">
201203
<h4>JSONL Format</h4>
202204
<div class="code-block">
203-
{"language":"Rust","library":"RustCrypto","file":"src/main.rs","span":{"line":12,"column":5},"symbol":"aes_gcm::Aes256Gcm","snippet":"use aes_gcm::Aes256Gcm;","confidence":0.99,"detector_id":"detector-rust"}
205+
{
206+
"language": "Rust",
207+
"library": "RustCrypto",
208+
"file": "src/main.rs",
209+
"span": {
210+
"line": 12,
211+
"column": 5
212+
},
213+
"symbol": "aes_gcm::Aes256Gcm",
214+
"snippet": "use aes_gcm::Aes256Gcm;",
215+
"confidence": 0.99,
216+
"detector_id": "detector-rust"
217+
}
204218
</div>
205219
</div>
206220

@@ -211,8 +225,14 @@ <h4>Patterns Configuration</h4>
211225
name = "PyCA cryptography"
212226
languages = ["Python"]
213227
[library.patterns]
214-
include = ["^\\s*from\\s+cryptography\\b"]
215-
apis = ["\\bFernet\\(", "\\.encrypt\\(", "\\.decrypt\\("]
228+
include = [
229+
"^\\s*from\\s+cryptography\\b"
230+
]
231+
apis = [
232+
"\\bFernet\\(",
233+
"\\.encrypt\\(",
234+
"\\.decrypt\\("
235+
]
216236
</div>
217237
<p style="margin-top: 0.8rem; color: #666; font-size: 0.9rem;">
218238
Define import patterns and API calls for each library
@@ -223,8 +243,13 @@ <h4>Patterns Configuration</h4>
223243
name = "OpenSSL"
224244
languages = ["C", "C++"]
225245
[library.patterns]
226-
include = ["^\\s*#\\s*include\\s*<openssl/[A-Za-z0-9_./-]+>"]
227-
apis = ["\\bEVP_[A-Za-z0-9_]+\\s*\\(", "\\bRSA_[A-Za-z0-9_]+\\s*\\("]
246+
include = [
247+
"^\\s*#\\s*include\\s*<openssl/[A-Za-z0-9_./-]+>"
248+
]
249+
apis = [
250+
"\\bEVP_[A-Za-z0-9_]+\\s*\\(",
251+
"\\bRSA_[A-Za-z0-9_]+\\s*\\("
252+
]
228253
</div>
229254
<p style="margin-top: 0.8rem; color: #666; font-size: 0.9rem;">
230255
C/C++ libraries use include patterns and function calls

0 commit comments

Comments
 (0)