Skip to content

Commit

Permalink
fix: VSCode 1.74.0 兼容,解决函数注释无法使用的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
OBKoro1 committed Dec 14, 2022
1 parent f7bf983 commit 4d06b13
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 25 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file removed korofileheader-4.9.1.vsix
Binary file not shown.
2 changes: 1 addition & 1 deletion src/function-params/function-c.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class GetParams {
init (lineProperty) {
this.text = lineProperty._text // 代码
this.text = lineProperty.text // 代码
this.match = false // 是否匹配到参数
this.res = ''
this.matchProcess()
Expand Down
2 changes: 1 addition & 1 deletion src/function-params/function-go.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class GetParams {
init (lineProperty) {
this.text = lineProperty._text // 代码
this.text = lineProperty.text // 代码
this.match = false // 是否匹配到参数
this.res = ''
this.matchProcess()
Expand Down
2 changes: 1 addition & 1 deletion src/function-params/function-java.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class GetParams {
init (lineProperty) {
this.text = lineProperty._text // 代码
this.text = lineProperty.text // 代码
this.match = false // 是否匹配到参数
this.res = ''
this.replaceModifier()
Expand Down
2 changes: 1 addition & 1 deletion src/function-params/function-js.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class GetParams {
init (lineProperty) {
this.text = lineProperty._text // 代码
this.text = lineProperty.text // 代码
this.match = false // 是否匹配到参数
this.res = ''
this.matchProcess()
Expand Down
2 changes: 1 addition & 1 deletion src/function-params/function-php.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class GetParams {
init (lineProperty) {
this.text = lineProperty._text // 代码
this.text = lineProperty.text // 代码
this.match = false // 是否匹配到参数
this.res = ''
this.matchProcess()
Expand Down
2 changes: 1 addition & 1 deletion src/function-params/function-python.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class GetParams {
init (lineProperty) {
this.text = lineProperty._text // 代码
this.text = lineProperty.text // 代码
this.match = false // 是否匹配到参数
this.res = ''
this.matchProcess()
Expand Down
2 changes: 1 addition & 1 deletion src/function-params/function-rust.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class GetParams {
init (lineProperty) {
this.text = lineProperty._text // 代码
this.text = lineProperty.text // 代码
this.match = false // 是否匹配到参数
this.res = ''
this.matchProcess()
Expand Down
2 changes: 1 addition & 1 deletion src/function-params/function-solidity.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class GetParams {
init (lineProperty) {
this.text = lineProperty._text // 代码
this.text = lineProperty.text // 代码
this.match = false // 是否匹配到参数
this.res = ''
this.matchProcess()
Expand Down
4 changes: 2 additions & 2 deletions src/function-params/function-ts.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
* Author : OBKoro1
* CreateDate : 2020-09-07 15:47:40
* LastEditors : OBKoro1
* LastEditTime : 2021-06-28 13:57:39
* LastEditTime : 2022-12-14 22:17:24
* File : \koro1FileHeader\src\function-params\function-ts.js
* Description : js语言获取函数参数
*/

class GetParams {
init (lineProperty) {
this.text = lineProperty._text // 代码
this.text = lineProperty.text // 代码
this.match = false // 是否匹配到参数
this.res = ''
this.matchProcess()
Expand Down
24 changes: 12 additions & 12 deletions src/logic/logic.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Author : OBKoro1
* Date : 2020-06-01 11:10:04
* LastEditors : OBKoro1 obkoro1@foxmail.com
* LastEditTime : 2022-05-21 18:08:02
* FilePath : /koro1FileHeader/src/logic/logic.js
* LastEditTime : 2022-12-14 22:17:09
* FilePath : /src/logic/logic.js
* Description : 逻辑输出
* https://github.com/OBKoro1
*/
Expand Down Expand Up @@ -100,8 +100,8 @@ function getMoreLine (cursorModeInternal, editor, moreLineObj) {
// 获取最后一行不为空的行数
function getEndLineNoEmpty (editor, moreLineObj) {
const { startObj, endObj } = moreLineObj
const lineNumber = endObj._line
for (let i = endObj._line; i >= startObj._line; i--) {
const lineNumber = endObj.line
for (let i = endObj.line; i >= startObj.line; i--) {
const lineProperty = editor.document.lineAt(i)
if (!lineProperty.isEmptyOrWhitespace) return i
}
Expand All @@ -111,8 +111,8 @@ function getEndLineNoEmpty (editor, moreLineObj) {
// 获取第一行不为空的行数
function getFirstLineNoEmpty (editor, moreLineObj) {
const { startObj, endObj } = moreLineObj
const lineNumber = startObj._line
for (let i = startObj._line; i <= endObj._line; i++) {
const lineNumber = startObj.line
for (let i = startObj.line; i <= endObj.line; i++) {
const lineProperty = editor.document.lineAt(i)
if (!lineProperty.isEmptyOrWhitespace) return i
}
Expand All @@ -123,23 +123,23 @@ function getFirstLineNoEmpty (editor, moreLineObj) {
function getMultilineText (editor, moreLineObj) {
const { startObj, endObj } = moreLineObj
let text = ''
for (let i = startObj._line; i <= endObj._line; i++) {
for (let i = startObj.line; i <= endObj.line; i++) {
const lineProperty = editor.document.lineAt(i)
text += lineProperty._text
text += lineProperty.text
}
return {
_text: text
text: text
}
}

// 选择多行判断
function isMoreLine (editor) {
const selectionsArr = editor.selections
const selectItem = selectionsArr[0]
const startObj = selectItem._start
const endObj = selectItem._end
const startObj = selectItem.start
const endObj = selectItem.end
// 多行返回对象
if (startObj._line !== endObj._line) {
if (startObj.line !== endObj.line) {
return { startObj, endObj }
}
}
Expand Down
7 changes: 4 additions & 3 deletions test/test-run/function-params/function.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
* Author : OBKoro1 obkoro1@foxmail.com
* Date : 2022-05-01 15:35:12
* Last Author : OBKoro1 obkoro1@foxmail.com
* LastEditTime : 2022-06-04 11:32:26
* FilePath : /fileHead/function-params/function.js
* Last Author : OBKoro1 1677593011@qq.com
* LastEditTime : 2022-12-14 22:23:22
* FilePath : /function-params/function.js
* description :
* koroFileheader VSCode插件
* Copyright (c) 2022 by OBKoro1 email: obkoro1@foxmail.com, All Rights Reserved.
Expand All @@ -30,6 +30,7 @@ export const download = async ( ) => {
* @return {type}
*/
export const download = async ( axiosMethods, apiLink, opts, fileName) => {};

/**
* @description:
* @param axiosMethods [type]
Expand Down

0 comments on commit 4d06b13

Please sign in to comment.