Skip to content

Commit

Permalink
chore: add jsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon-He95 committed Oct 22, 2024
1 parent cb2c97c commit e4ceacb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/string/findMatchEnd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ const matchMap = {
'"': '"',
'<': '>',
}
/**
* 查找匹配符号的结束偏移量
*
* @param matchStr - 要匹配的符号
* @param code - 包含符号的代码字符串
* @returns 匹配符号的结束偏移量
* @throws 如果在代码字符串中找不到匹配符号的结束偏移量,则抛出错误
*/
export function findMatchEndOffset(matchStr: string, code: string) {
let offset = 0
let dep = 0
Expand Down

0 comments on commit e4ceacb

Please sign in to comment.