Please add a class in the Error: File "....md" does not exist at this path or add a relative include feature

potsky's Avatar

potsky

22 Oct, 2013 07:05 PM

Hi !

We manage some huge documentations with Sublime Text, GIT and Marked 1 (and now with Marked 2).

The include problem

Take this example :

  • File /D1/D2/A.en.md includes file F.en.md( the included file path is of course /D1/D2/F.en.md)
  • File /D1/D2/A.fr.md includes file F.fr.md( the included file path is of course /D1/D2/F.fr.md)
  • File /D1/D2/F.fr.md includes file F.assets (/D1/D2/F.assets contains, referenced images, referenced links)
  • File /D1/D2/F.en.md includes file F.assets (/D1/D2/F.assets contains, referenced images, referenced links)

Assets are shared between all localized files.

Then the same file F will be used in an other location :

  • File /D1/B.en.md includes file D2/F.en.md
  • File /D1/B.fr.md includes file D2/F.fr.md

Then we have of course an error because Marked is looking for file /D1/F.assets which does not exist
The trick today for use is :

  • File /D1/B.en.md includes file D2/F.en.md
  • File /D1/B.fr.md includes file D2/F.fr.md
  • File /D1/B.en.md includes file D2/F.assets
  • File /D1/B.fr.md includes file D2/F.assets

We have the assets because of the second include but the first include still fails and we have this error : Error: File "F.assets" does not exist at this path

The easy "acceptable" solution

Please add a class in your HTML error message in such a way that we can hide this class in a custom CSS

<p><em><strong>Error:</strong> File &quot;...&quot; does not exist at this path</em></p>
becomes
<p class="_marked_error"><em><strong>Error:</strong> File &quot;...&quot; does not exist at this path</em></p>

The clean solution

Includes are absolutely awesome, as CSS includes or file references
Keep <<[...] style which is relative to the initial document
Add <<~[...] (or sth like this) which is relative to the file which call this include, not the opened document, as in CSS

I talk about CSS because the way CSS handle files is perfect for all HTML developers.
url(THE_PATH) is always relative to the CSS file and not the HTML file which calls the CSS.

  1. Support Staff 1 Posted by Brett on 22 Oct, 2013 08:02 PM

    Brett's Avatar

    Duly noted. I especially like the <<~ syntax idea. I'll plan to implement a form of these requests shortly.

  2. 2 Posted by potsky on 22 Oct, 2013 08:31 PM

    potsky's Avatar

    Hey ! I am happy that you like this idea !

    The <<~ syntax is of course ok for all your include styles :

    • <<~[]
    • <<~()
    • <<~{}

    I would like to tell you (and your team ?) that the combo Marked / Sublime Text / GIT just make me save huge time daily. I really really really like this workflow. Congratulations for this app !

  3. 3 Posted by potsky on 23 Nov, 2013 06:50 PM

    potsky's Avatar

    Hi Brett,

    any news about this feature ? I have seen several Marked 2 updates for one month and don't know the change log.

    Regards,

    potsky

  4. Support Staff 4 Posted by Brett on 23 Nov, 2013 08:39 PM

    Brett's Avatar

    Assuming you're referring to the special relative include syntax, it's
    still on my todo list.

    -Brett

  5. 5 Posted by potsky on 23 Nov, 2013 09:33 PM

    potsky's Avatar

    Yes this is this feature, thank you for your answer.

    Is there a way to follow the change log of Marked 2 ?
    I was following the change log on marked 1 but I am not able to find the version 2.

    Potsky 
    www.potsky.com

    From: Brett Brett
    Reply: Brett [email blocked]

  6. Support Staff 6 Posted by Brett on 23 Nov, 2013 09:40 PM

    Brett's Avatar

    I've been keeping up with documentation, but I've been really bad about
    posting regular changelogs other than in the built-in update dialogs.
    I'll try to gather them and get a changelog page going again.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac