Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Triple hat call in child document doesn't recognise function in parent document #32

Open
jwoLondon opened this issue Jun 19, 2019 · 0 comments
Labels
bug Something isn't working priority/p2

Comments

@jwoLondon
Copy link
Member

Suppose we have a function defined in a document:

parent.md

```elm{l=hidden}
myFunction : String
myFunction =
    "Hello from parent"
```

And if a child document that follows it makes a call to the parent via a triple hat expression:

child.md

---
follows: parent
---

^^^elm {r=myFunction}^^^

This results in the error I cannot find a 'myFunction' variable

However if some other function is declared in the child document, the function in the parent is called correctly:

---
follows: parent
---

^^^elm {r=myFunction}^^^

```elm {l=hidden}
anotherFunction : Int
anotherFunction =
    7
```

It would appear that there must be at lest one declared function within a document before a triple hat expression can reference a function in parent (or grandparent etc.) document. This will prevent 'clean' documents from being created that have no code but reference functions from other documents in the hierarchy.

@jwoLondon jwoLondon added bug Something isn't working priority/p1 priority/p2 and removed priority/p1 labels Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority/p2
Projects
None yet
Development

No branches or pull requests

1 participant