Skip to content

Commit

Permalink
実態に即した変数名に
Browse files Browse the repository at this point in the history
  • Loading branch information
mousu-a committed Jan 12, 2025
1 parent 1518399 commit e0187e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/javascript/markdown-it-link-to-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ export default (md, _options) => {
}
// リンクの親のp要素が他のマークダウンにネストしていない場合のみリンクカードを生成する(details, message以外)
const sourceToken = tokens[i - 1]
const isParentRootParagraph =
const isAllowedParagraph =
sourceToken &&
sourceToken.type === 'paragraph_open' &&
sourceToken.level === allowLevel
if (!isParentRootParagraph) continue
if (!isAllowedParagraph) continue

// 記法の対象となるlinkはinlineTokenのchildrenにのみ存在する
if (token.type !== 'inline') continue
Expand Down

0 comments on commit e0187e4

Please sign in to comment.