tag:support.markedapp.com,2011-09-11:/discussions/problems/158258-showing-missing-file-linksMarked: Discussion 2020-07-20T17:16:03Ztag:support.markedapp.com,2011-09-11:Comment/484718082020-07-18T22:36:09Z2020-07-18T22:36:09ZShowing "missing file" links<div><p>I accidentally messed up a markdown link by pasting a full link where the bare link should have been:</p>
<pre>
<code>[Why Hamilton is as frustrating as it is brilliant -- and impossible to pin down]([Hamilton on Disney+: Why we'll never stop fighting about this brilliant, frustrating musical - Vox](https://ktxc.to/hamilton-slippery))</code>
</pre>
<p>I recognize that this doesn't show up as an error when validating external links because it's an external link. But when I hover over the link in Marked, it knows it is a problem "missing file" (because it tells me so). But there is no visual or other indicator other than that shown when I hover.</p>
<p>It feels like this should show up in some proofing tool or mode. Or does it and I am just missing it?</p></div>christag:support.markedapp.com,2011-09-11:Comment/484718082020-07-20T15:19:19Z2020-07-20T15:19:19ZShowing "missing file" links<div><p>Which processor are you using? With MMD and Preferences->Proofing->Highlight Markdown syntax errors enabled, you should see a red outline.</p>
<p><img src="http://ckyp.us/PvxKxK+" alt=""></p>
<p>Doesn't work as well the way that Discount (GFM) renders it, but it should still be pretty obvious where an error is:</p>
<p><img src="http://ckyp.us/twNwjR+" alt=""></p>
<p>Can you show me how it's rendering on your end?</p>
<p>-Brett</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/484718082020-07-20T15:55:20Z2020-07-20T15:58:57ZShowing "missing file" links<div><p>I'm using the Multimarkdown processor with Highlight Markdown Syntax erros checked. Attached is what I see with proofing on and the Swiss style sheet (if that makes a difference) with the problematic part in context (which might also make a difference, though even the minimal example I shared doesn't flag a problem on my end) no indication there is a problem) ... this is obviously item #4 :)</p>
<p>I only see that there's a missing file if I hover over the link that otherwise doesn't show a problem.</p>
<p>I'm also attaching the full markdown file.</p></div>christag:support.markedapp.com,2011-09-11:Comment/484718082020-07-20T16:11:42Z2020-07-20T16:11:42ZShowing "missing file" links<div><p>On my end, your Markdown definitely renders as shown in my original<br>
screenshot, with the obviously-bad link showing up as malformed. I'm not<br>
sure why your processor is turning that into any kind of valid link and<br>
mine isn't.</p>
<p>In answer to the question, though, Marked's link checking has two<br>
separate parts. The "Validate Links" feature scans only for 'http' urls<br>
and looks for response codes from visiting those urls. The link hover,<br>
on the other hand, will recognize a file link and do a quick request to<br>
the filesystem to get info on the linked file. But that functions<br>
separately from url validation. I <em>could</em> feasibly add filesystem checks<br>
to the Link Validation feature, but there are many cases where links in<br>
a document aren't expected to work at the time of rendering, and are<br>
instead placeholders or fragment links, which makes it harder to<br>
universally determine that a link is bad.</p>
<p>In your particular case, the processor should be leaving the square<br>
brackets and parens in the final output, which Marked <em>does</em> recognize<br>
as the result of a malformed link. Again, I'm not immediately certain<br>
why you're not seeing that happen. Because it's generating a valid HTML<br>
<code><a></code> tag for it, it's not triggering Marked's detection of the malformed link. Like I said, I loaded your provided Markdown using the<br>
MMD processor and did <em>not</em> get the same result as you, so I'm going to<br>
have to do some digging to see if I can replicate.</p>
<p>Is there any chance you have a Custom Processor running?</p>
<p>-Brett</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/484718082020-07-20T16:24:25Z2020-07-20T16:25:49ZShowing "missing file" links<div><p>That was it! At some point in the distant past I set up a custom processor (I don't remember why):</p>
<pre>
<code>/usr/local/bin/pandoc
-f markdown -t html5</code>
</pre>
<p>I turned that off and voila! Sorry for taking up your time; I really should have though to check that.</p>
<p>Added: it makes complete sense to me not to have file checks happening with the link validation!</p></div>christag:support.markedapp.com,2011-09-11:Comment/484718082020-07-20T17:16:02Z2020-07-20T17:16:02ZShowing "missing file" links<div><p>No problem!</p>
<p>-Brett</p></div>Brett