Need help with markdown card

I am following a tutorial, and I need to create a markdown card. I am using the same code as the tutorial but I am getting a different result. I have all the required entities, but the card is blank. Can anyone see where I am going wrong please?

here is my code:

<table> 
       {% for i in range(7) %}
           {% set index = i|string %}
           {% set meal_date = states("sensor.mealie_day" + index + "_date") %}
           {% set meal_name = states("sensor.mealie_day" + index + "_name") %}
           {% if meal_date != 'unknown' %} 
           <tr>
               <td>
                {{ ['ma','di','wo','do','vr','za','zo'][strptime(meal_date, "%Y-%m-%d").weekday()] }}
               </td> 
               <td>&nbsp; &nbsp;</td>
               <td>{{ meal_name }}</td>
           </tr>
           {% endif %}
       {% endfor %}
</table>

You can copy paste the whole thing in the Developer Tools > Template
Of course this will not provide the html stuff but it will help to identify where it may go wrong