Skip to content

Commit

Permalink
fix(modes): improve lobster_srv_logs
Browse files Browse the repository at this point in the history
  • Loading branch information
F0rce committed Jul 29, 2022
1 parent 11a9ae5 commit 5d640c4
Showing 1 changed file with 13 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,19 @@ ace.define(
},
{
token: "keyword",
regex: "^(\\d{2}:\\d{2}:\\d{2}){1}\\s+(?=(([a-zA-Z]+)?|([a-zA-Z]+:.*?)+(?!\\S)))?",
next: "handleType",
regex: "^\\d{2}:\\d{2}:\\d{2}(?=(\\s+[a-zA-Z0-9:\\-\\/[\\]()+@#]+))",
},
{
token: "meta.tag",
regex: "(?<=^\\d{2}:\\d{2}:\\d{2}\\s+)[a-zA-Z0-9:\\-\\/[\\]()+@#]+(?=\\s+[a-zA-Z0-9:\\-\\/[\\]()+@#]+\\s+.*$)",
},
{
token: "constant.language",
regex: "(?<=^\\d{2}:\\d{2}:\\d{2}\\s+[a-zA-Z0-9:\\-\\/[\\]()+@#]+\\s+)[a-zA-Z0-9:\\-\\/[\\]()+@#]+(?=(\\s+.*$))",
},
{
token: "constant.numeric",
regex: "(?<=^\\d{2}:\\d{2}:\\d{2}\\s+[a-zA-Z0-9:\\-\\/[\\]()+@#]+\\s+[a-zA-Z0-9:\\-\\/[\\]()+@#]+\\s+).*$",
},
],

Expand Down Expand Up @@ -95,39 +106,6 @@ ace.define(
defaultToken: "string",
},
],

handleType: [
{
token: "meta.tag",
regex: "(([a-zA-Z]+)?|([a-zA-Z]+:.*?)+(?!\\S))\\s+(?=(\\w+:?)+)",
next: "handleOccurance",
},
{
defaultToken: "text",
},
],

handleOccurance: [
{
token: "constant.language",
regex: "([a-zA-Z]+:.*?)+(?!\\S)",
next: "handleError",
},
{
defaultToken: "text",
},
],

handleError: [
{
token: "constant.numeric",
regex: "(.*)?$",
next: "start",
},
{
defaultToken: "text",
},
],
};
};

Expand Down

0 comments on commit 5d640c4

Please sign in to comment.