Skip to content

Commit

Permalink
feat(ssa.to):use meta language not ruleName
Browse files Browse the repository at this point in the history
  • Loading branch information
wlingze committed Jan 10, 2025
1 parent 272fcc8 commit 85e4c06
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ function SyntaxFlowTable() {
// 提取所有语言
const langs = new Set();
rules.forEach(rule => {
const lang = rule.rule.split("-")[0];
const lang = rule.language
if(lang && lang !== "sca") {
langs.add(lang);
}
Expand Down Expand Up @@ -242,10 +242,10 @@ function SyntaxFlowTable() {
if(tabKey === "version") {
return data;
} else if(tabKey === "sca") {
return data.filter(item => item.rule.includes("-sca-"));
return data.filter(item => item.rule.includes("sca") || item.rule.includes("SCA"));
} else {
return data.filter(item =>
item.rule.startsWith(`${tabKey}-`) && !item.rule.includes("-sca-")
item.language == tabKey
);
}
};
Expand Down

0 comments on commit 85e4c06

Please sign in to comment.