Stream: implementers
Topic: Markdown and styling
Alexander Henket (Nov 22 2016 at 17:11):
I'm writing implementation guide stuff currently. My only interface is markdown enabled. Every once in a while need more than Markdown will let me (background-color, color, margin, padding, ...) but nothing in the @style or @class ever renders properly. Anyone know how build richer stuff without breaking markdown?
Example:
<span style="background-color: #ddddd"> - Boilerplate line 1 <br/>- Boilerplate line 2 </span>
Grahame Grieve (Nov 23 2016 at 05:28):
I don't know that you can; I think you need to make out of band agreements around stylesheets for post-markdown content
Grahame Grieve (Nov 23 2016 at 05:29):
The wonderful thing about markdown is that the creator refused to standardise it. The official variant for us is this one: https://daringfireball.net/projects/markdown/syntax
Grahame Grieve (Nov 23 2016 at 05:29):
but your interface could be using anything
Stephen Royce (Nov 23 2016 at 23:41):
Most implementations use the GitHub variant.
@Alexander Henket, if you're using the eXist MarkDown module, that's what it uses. Both the Daring Fireball and GitHub variants allow for inclusion of pure HTML, though, so you should be able to do this.
Alexander Henket (Nov 24 2016 at 07:20):
I've just learned that the flavor is CommonMark (http://commonmark.org). CommonMark takes care of exactly the ambiguity that Grahame mentions and in doing so is unambiguously limited in its capabilities. So I'll be talking to my 'hoster' to see what can be done.
Vadim Peretokin (Nov 24 2016 at 07:33):
Just curious, why not use html then? Isn't the simplicity of markdown defeated when you start complicating it?
Alexander Henket (Nov 24 2016 at 07:36):
Like Einstein said: As simple as possible but not any simpler. Without styling things are too simple/limited.
Alexander Henket (Nov 24 2016 at 07:37):
O and *down was not my choice... I would have loved to work with a proper XHTML editor, site content manager, something that does broken link checking, takes care of a central place for storing headers/footers and what not
Alexander Henket (Nov 24 2016 at 07:39):
Markdown would have allowed for most of that stuff, not sure about CMS compatibility, but CommonDown is too restrictive.
Grahame Grieve (Nov 24 2016 at 07:40):
you can do linking checking with markdown, along with a proper editor, but the key advantage of markdown - that doesn't allow pure html , that is - is that you can confidently secure the content, where as with markup, security is always a contest
Grahame Grieve (Nov 24 2016 at 07:41):
we're watching commonmark. it's the most likely thing to be a standard. but the community has to converge to it. And @Stephen Royce github is used be some implementations, but not most.
Alexander Henket (Nov 24 2016 at 07:41):
That security argument is mostly relevant for my hoster, not for me. I only know I lack what I need.
Alexander Henket (Nov 24 2016 at 07:42):
CommonMark has this notion on its front page that with some help they will be getting to 1.0 final early 2016. I guess they got delayed
John Moehrke (Nov 24 2016 at 14:14):
security is very important, but so is robustness to capabilities. By limiting to markdown we can require everyone supports all of markdown; go the other way and you can never be sure what is supported.
John Moehrke (Nov 24 2016 at 14:15):
What specifically is so critical that you want to break out of the markdown limits? Background color doesn't seem compelling, or it hasn't been described in a compelling way.
Alexander Henket (Nov 24 2016 at 14:23):
Why is every specification out there nicely styled and layed out, while I'm stuck with black and white basic notepad stuff? I don't get why wanting style is something to discuss. Sorry to be blunt about it.
Vadim Peretokin (Nov 24 2016 at 21:50):
Yeah I understand your desire, but markdown gets converted to html, which you can style then?
Alexander Henket (Nov 25 2016 at 09:49):
For that you need hooks like classes. Also not having access to div/span in my source makes it really difficult to style later. I've already talked to the hoster and my wishes are on the (long) todo list... :-) Eventually life will get better.
Last updated: Apr 12 2022 at 19:14 UTC