(
model: monaco.editor.ITextModel,
struct: ILeafConfStruct,
)
| 123 | } |
| 124 | |
| 125 | export function parseSectionGeneral( |
| 126 | model: monaco.editor.ITextModel, |
| 127 | struct: ILeafConfStruct, |
| 128 | ): ILeafConfKvItem[] { |
| 129 | let ret: ILeafConfKvItem[] = [] |
| 130 | for (const lineId of struct.sections |
| 131 | .filter(s => s.sectionName === SECTION_GENERAL) |
| 132 | .flatMap(s => Array.from({ length: s.endLine - s.startLine }, (_, i) => i + s.startLine + 1))) { |
| 133 | |
| 134 | const line = model.getLineContent(lineId) |
| 135 | const item = parseKvLine(line, lineId, 1) |
| 136 | if (item !== undefined) { |
| 137 | ret.push(item) |
| 138 | } |
| 139 | } |
| 140 | return ret |
| 141 | } |
no test coverage detected