Skip to content

Commit 929f93f

Browse files
committed
2 parents febaaae + d35de94 commit 929f93f

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
@@ -67,7 +67,7 @@ export class ViewFieldMDRC extends AbstractViewFieldMDRC {
6767
}
6868
}
6969

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

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

0 commit comments

Comments
 (0)