Please add a class in the Error: File "....md" does not exist at this path or add a relative include feature
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 fileF.en.md
( the included file path is of course/D1/D2/F.en.md
) - File
/D1/D2/A.fr.md
includes fileF.fr.md
( the included file path is of course/D1/D2/F.fr.md
) - File
/D1/D2/F.fr.md
includes fileF.assets
(/D1/D2/F.assets
contains, referenced images, referenced links) - File
/D1/D2/F.en.md
includes fileF.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 fileD2/F.en.md
- File
/D1/B.fr.md
includes fileD2/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 fileD2/F.en.md
- File
/D1/B.fr.md
includes fileD2/F.fr.md
- File
/D1/B.en.md
includes fileD2/F.assets
- File
/D1/B.fr.md
includes fileD2/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 "..." does not exist at this path</em></p>
becomes
<p class="_marked_error"><em><strong>Error:</strong> File "..." 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.
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
Support Staff 1 Posted by Brett on 22 Oct, 2013 08:02 PM
Duly noted. I especially like the <<~ syntax idea. I'll plan to implement a form of these requests shortly.
2 Posted by potsky on 22 Oct, 2013 08:31 PM
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 Posted by potsky on 23 Nov, 2013 06:50 PM
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
Support Staff 4 Posted by Brett on 23 Nov, 2013 08:39 PM
Assuming you're referring to the special relative include syntax, it's
still on my todo list.
-Brett
5 Posted by potsky on 23 Nov, 2013 09:33 PM
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]
Support Staff 6 Posted by Brett on 23 Nov, 2013 09:40 PM
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.