Markdown only processed sometimes even within the same page

I have a page with a few links and images included. It’s nothing fancy or crazy, just a simple page. However, for some reason I can’t fathom, it seems to randomly not process Markdown. It does it to the extent that even code I’ve copied and pasted from elsewhere on the page doesn’t work.

For example I have:

![A training session taking place](training-session.jpg?classes=responsive-img,right,z-depth-1)

Which works like a charm. I decided to move it into a grid instead of floated right and slightly lower down the page so ended up with this:

    <div class="col s4">
        ![A training session taking place](training-session.jpg?classes=responsive-img,z-depth-1)
    </div>

That removed the link highlighting in the admin editor and when I viewed the saved page, I just see the markdown, not the image. I changed the actual image back to the original link and still no image showed.

I did wonder if the highlighting meant that I had a flaw in the syntax, however deleting the whitespace/indentation made the editor highlight as you’d expect, but the saved page still displays the raw markdown. I have also edited the page in vi to ensure that the editor isn’t the issue, but still unprocessed markdown.

I have a link which acts similarly. It is processed fine as part of a sentence, however when I copy and paste it elsewhere the whole thing is just unprocessed.

I can’t understand why the same syntax on the same page is processed sometimes but not others. I am clearing the cache between saving and viewing just in case that was a bug but it makes no difference. I’m open to suggestions of tests I can try and I’m aware this could be something painfully simple I’ve missed so no suggestion is too obvious right now.

Try replacing the space character with &bnsp; (unicoded version of a space character)

And,

Why haven’t you included the http/https stuff in front of your training-session.jpg? :slight_smile:
Try to include, see if it does anything

Lmk if it changes anything, if not we’ll look for more options :slight_smile:

As suggested I’ve changed all the spaces in the markdown to &nbsp; and I’ve also added empty lines above and below both the link/button I’m having trouble with and the image, but no change.

I also changed the image to the full URI (I literally did copy image location on the version showing on the page and pasted that in) and again, no change (except a longer piece of markdown is visible).

Tbh since it’s a media link to an image uploaded into the page folder I’ve never used full URIs before. The generated images (when they work, which they generally do) come out with the full absolute path which means everything correctly goes to https://… While I’m not a huge fan of the URIs it generates the benefits of such a simple system far outweigh my OCD in that regard, it’s so easy to move whole directories around and not have to think about image links. If there’s an advantage to using the full URI I’d be interested to learn more.

Have you got a link to your project where I can see what’s going on? Might be possible that md gets rendered in certain parts and not in others, could be the reason why you see this showing up as just text

Sure thing. I keep hiding the unprocessed markdown in comments between testing to keep it looking tidy but I’ve removed them so it’s all on show for now:

The problem page

This is the full, current, markdown for the unprocessed area:

<div class="row">
<div class="col s4">

[See&nbsp;Our&nbsp;Current&nbsp;Training&nbsp;Days](/training/pat?waves-effect,waves-light,btn)

</div>
<div class="col s4">
<ul class="browser-default">
<li>Safe Working</li>
<li>Types of Equipment</li>
<li>Equipment Construction</li>
<li>Classes of Equipment</li>
<li>Types of Inspection and Test</li>
<li>User Checks</li>
<li>Formal Visual Inspections</li>
<li>Combined Inspection and Test</li>
<li>Fuse Rating Calculations</li>
<li>Records and Labels</li>
</ul>
</div>
<div class="col s4">

![A&nbsp;training&nbsp;session&nbsp;taking&nbsp;place](https://www.adrs.ltd.uk/user/pages/02.training/training-session.jpg?classes=responsive-img,z-depth-1)

</div>
</div>

And the working markdown is:

![A training session taking place](training-session.jpg?classes=responsive-img,right,z-depth-1)

And

dedicated [training days](/training/pat) throughout

OK checked what it could be :slight_smile: And hopefully it’s as easy for you to fix as it was for me :wink:

Go to the admin section of your page:

configuration
system
toggle: escape markup

Check if it works for you :wink: did for me :slight_smile: goodluck!

Well it does…

Unfortunately escaping the markup means the HTML gets displayed without rendering and that’s an even bigger problem.

Unfortunately it just seems Markdown ignores anything in html block elements. The only option seems to be changing the whole page to HTML. Not the end of the world, just slightly irksome really.

if you want to try another fix :slight_smile: you wouldn’t have to input markdown :wink: try to add this :slight_smile:
<img src="https://www.adrs.ltd.uk/user/pages/02.training/training-session.jpg?classes=,z-depth-1"></>

also worked for me, without the rest breaking , good luck!