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

Restrictions on page variable values #735

Closed
damithc opened this issue Feb 27, 2019 · 7 comments
Closed

Restrictions on page variable values #735

damithc opened this issue Feb 27, 2019 · 7 comments

Comments

@damithc
Copy link
Contributor

damithc commented Feb 27, 2019

The following does not seem to work:

<variable name="heading"># <include src="foo.md#title" inline /></variable>

{{ heading }}

Is that intended?

@damithc damithc added f-Variables s.UnderDiscussion The team will evaluate this issue to decide whether it is worth adding a-Syntax labels Feb 27, 2019
@acjh
Copy link
Contributor

acjh commented Feb 27, 2019

Expected:

<h1 id="expected">Expected<a class="fa fa-anchor" href="#expected"></a></h1>

Actual:

<h1 id>
  <include src="foo.md#title" inline></include><a class="fa fa-anchor" href="#"></a>
</h1>

@damithc
Copy link
Contributor Author

damithc commented Feb 28, 2019

@jamos-tay your take?

@jamos-tay
Copy link
Contributor

Hmm this one is a little trickier than I thought

The current variable logic bypasses the _preprocess step altogether where all the include processing is done (i.e. variables are collected separately), so includes are simply ignored.

I can't really think of a clean solution as of now... Maybe I can integrate the variable collection into _preprocess? I'll do a little more digging and see if that works

In the meantime is it possible to wait for #682, and include foo.md's title as a variable?

@damithc
Copy link
Contributor Author

damithc commented Feb 28, 2019

In the meantime is it possible to wait for #682, and include foo.md's title as a variable?

Sure. I've used a workaround for the time being.

@ang-zeyu
Copy link
Contributor

This seems to be fixed, not sure by which PR.

Let's add a test case for this in the main test site sometime

@ang-zeyu ang-zeyu added a-Testing d.easy good first issue and removed a-Syntax s.UnderDiscussion The team will evaluate this issue to decide whether it is worth adding labels Aug 10, 2020
@Gulruhbet
Copy link

Do you have intra code

@ang-zeyu
Copy link
Contributor

intra code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants