Skip to content

Commit

Permalink
aタグのhrefの空白文字を_に置き換える
Browse files Browse the repository at this point in the history
空白文字があると、一つのidが複数のidとして認識されてしまう。
  • Loading branch information
Appbird committed Sep 2, 2021
1 parent 7d905a2 commit 18064bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ts/client/view/parts/RuleIndexPart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ export class RuleIndexPart {
}
private generateRuleIndexHTML(ruleObj: RuleAttributeAndAppliedClassInfo, language: LanguageInApplication) {
return `<div class="__item">
<div><a class="u-bolderChara u-underline" href="#${ruleObj.rule.ruleName}"><i class="${ruleObj.rule.iconCSS}"></i> ${ruleObj.rule.title}</a>${(ruleObj.rule.note || 0) !== 0 ? ` <i class="u-redChara u-bolderChara">${choiceString(contents.annotated, language)}</i>` : ""}</div> <div class="__classItems">${this.generateClassDescriptionInRuleIndex(ruleObj.appliedClass, language)}</div>
<div><a class="u-bolderChara u-underline" href="#${ruleObj.rule.ruleName.replace(/\s/g,"_")}"><i class="${ruleObj.rule.iconCSS}"></i> ${ruleObj.rule.title}</a>
${(ruleObj.rule.note || 0) !== 0 ? ` <i class="u-redChara u-bolderChara">${choiceString(contents.annotated, language)}</i>` : ""}</div> <div class="__classItems">${this.generateClassDescriptionInRuleIndex(ruleObj.appliedClass, language)}</div>
</div>`;
}
private generateClassDescriptionInRuleIndex(appliedClass: AppliedRuleClassResolved[], language: LanguageInApplication) {
Expand Down

0 comments on commit 18064bb

Please sign in to comment.