Skip to content

Commit d35de94

Browse files
committed
fix #104
1 parent b652e7a commit d35de94

File tree

5 files changed

+14
-3
lines changed

5 files changed

+14
-3
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
text: test
3+
---

exampleVault/View Fields/View Field.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,9 @@ Number one is: `VIEW[{number1}]` units
1212
Number two is: `VIEW[{number2}]` units
1313

1414
Combined: `VIEW[{number1} * {number2}]` cm equals `VIEW[{number2} * {number1} cm to {unit}]`
15+
16+
## Other Note
17+
18+
`INPUT[text:Other Note#text]`
19+
20+
`VIEW[{Other Note#text}]`

src/parsers/BindTargetParser.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { parsePath } from '@opd-libs/opd-utils-lib/lib/ObjectTraversalUtils';
33
import { IPlugin } from '../IPlugin';
44

55
export interface BindTargetDeclaration {
6+
fullDeclaration: string;
67
filePath: string;
78
fileName: string;
89
metadataFieldName: string;
@@ -22,6 +23,7 @@ export class BindTargetParser {
2223
}
2324

2425
const bindTargetDeclaration: BindTargetDeclaration = {} as BindTargetDeclaration;
26+
bindTargetDeclaration.fullDeclaration = bindTargetString;
2527

2628
const bindTargetParts: string[] = bindTargetString.split('#');
2729

src/renderChildren/JsViewFieldMDRC.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export class JsViewFieldMDRC extends AbstractViewFieldMDRC {
5757
}
5858
}
5959

60-
parseExpression() {
60+
parseExpression(): void {
6161
if (!this.viewFieldDeclaration.code) {
6262
return;
6363
}

src/renderChildren/ViewFieldMDRC.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export class ViewFieldMDRC extends AbstractViewFieldMDRC {
6868
}
6969
}
7070

71-
parseExpression() {
71+
parseExpression(): void {
7272
const declaration = this.viewFieldDeclaration.declaration ?? '';
7373
let varCounter = 0;
7474

@@ -77,7 +77,7 @@ export class ViewFieldMDRC extends AbstractViewFieldMDRC {
7777
substring = substring.substring(1, substring.length - 1).trim();
7878
// replace by variable name;
7979
for (const variable of this.variables) {
80-
if (variable.bindTargetDeclaration.metadataFieldName === substring) {
80+
if (variable.bindTargetDeclaration.fullDeclaration === substring) {
8181
let varName = `MB_VAR_${varCounter}`;
8282
variable.contextName = varName;
8383
varCounter += 1;

0 commit comments

Comments
 (0)