From 76333fbdef295d1e4b510b39316f5e9283b47003 Mon Sep 17 00:00:00 2001 From: "DESKTOP-57U3QJV\\user01" Date: Wed, 27 Dec 2023 10:12:19 +0800 Subject: [PATCH] Fix bug: Corrected output information --- index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index 573b3bd..b01d5d3 100644 --- a/index.html +++ b/index.html @@ -74,8 +74,8 @@ var csvData = pako.inflate(uintArray, { to: 'string' }); // CSV 資料預處理 - var lines = csvData.split('\n').map(function(line) { - return removeAccents(line.toLowerCase()); + var lines = csvData.split('\n').map(line => { + return [removeAccents(line.toLowerCase()), line]; }); // 文字框改變時 call searchCSV() @@ -92,8 +92,8 @@ // 搜尋每一行 for (var i = 0; i < lines.length; i++) { - if (lines[i].includes(input)) { - matchingLines += lines[i] + '
'; + if (lines[i][0].includes(input)) { + matchingLines += lines[i][1] + '
'; } }