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.
As suggested I’ve changed all the spaces in the markdown to 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:
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 you wouldn’t have to input markdown try to add this <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!