Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 72502

Inside a loop, the non-loop variable did not get the array from the loop variables in Markdown, Pandoc and YAML

$
0
0

Observe well the last variable mais, which will get the array from the variable icones:

  • YAML in a Markdown file:
---

gnome: 'gnome'

icones:
  - {nome: actions}
  - {nome: apps}
  - {nome: devices}
  - {nome: mimetypes}
  - {nome: places}
  - {nome: status}

mais:
  - {url: 'filename.com/$icones.nome$/logo=$gnome$'}

---
  • In another Markdown file:
$for(icones)$
  <img alt="$icones.nome$"   name="$icones.nome$"   src="https://$mais.url$"/>
$endfor$

The item will get successfully all the variables, but the variable $mais.url$ will not get the array variables.

Here is the result:

<img alt="actions"   name="actions"   src="https://"/>
<img alt="apps"   name="apps"   src="https://"/>
<img alt="devices"   name="devices"   src="https://"/>
<img alt="mimetypes"   name="mimetypes"   src="https://"/>
<img alt="places"   name="places"   src="https://"/>
<img alt="status"   name="status"   src="https://"/>

It should be like:

<img alt="actions"   name="actions"   src="https://filename.com/actions/logo=gnome"/>
<img alt="apps"      name="apps"      src="https://filename.com/apps/logo=gnome"/>
<img alt="devices"   name="devices"   src="https://filename.com/devices/logo=gnome"/>
<img alt="mimetypes" name="mimetypes" src="https://filename.com/mimetypes/logo=gnome"/>
<img alt="places"    name="places"    src="https://filename.com/places/logo=gnome"/>
<img alt="status"    name="status"    src="https://filename.com/status/logo=gnome"/>

Viewing all articles
Browse latest Browse all 72502

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>