update highlight
This commit is contained in:
parent
5fc5908cbb
commit
b60bc97bdf
|
|
@ -8,7 +8,7 @@ export default class LogsController {
|
|||
public async showLog({request, response}: HttpContextContract) {
|
||||
try {
|
||||
// fghf
|
||||
const checkSpecialVersion = (paragraph) => {
|
||||
const checkSpecialVersion = async (paragraph) => {
|
||||
try {
|
||||
const regex = /\(CAT[1-9]K.*Version 16\.9\.[2-9]/;
|
||||
const regex1 =
|
||||
|
|
@ -77,15 +77,16 @@ export default class LogsController {
|
|||
.map((obj) => obj.$original.value);
|
||||
|
||||
let data = content.data.split("\n");
|
||||
data.map((line, index) => {
|
||||
data.map(async(line, index) => {
|
||||
data[index] = index + 1 + "|-|" + line;
|
||||
|
||||
if(checkSpecialVersion(line)!==""){
|
||||
console.log("data.search ", data[index].search(checkSpecialVersion(line)))
|
||||
if(await checkSpecialVersion(line)!==""){
|
||||
const specialVersion = await checkSpecialVersion(line)
|
||||
console.log("data.search ", data[index].search(specialVersion))
|
||||
console.log("data.length ", data[index].length)
|
||||
console.log(data[index].slice(0, data[index].search(checkSpecialVersion(line)-checkSpecialVersion(line).length)))
|
||||
console.log(data[index].slice(0, data[index].search(await specialVersion-specialVersion.length)))
|
||||
data[index] =
|
||||
data[index].slice(0, data[index].search(checkSpecialVersion(line)))
|
||||
data[index].slice(0, data[index].search(specialVersion))
|
||||
// +
|
||||
// "|-|" +
|
||||
// checkSpecialVersion(line) +
|
||||
|
|
|
|||
Loading…
Reference in New Issue