<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div style="" class="markdown-here-wrapper"
data-md-url="Thunderbird">
<p style="margin: 1.2em 0px ! important;">Am 16.07.16 um 21:44
schrieb Allan Odgaard:</p>
<p style="margin: 1.2em 0px ! important;"></p>
<div class="markdown-here-exclude">
<p></p>
<blockquote
cite="mid:A17AF4F4-3847-4CF2-9B8D-B05A8D4770DC@textmate.org"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8">
<div style="font-family:sans-serif">
<div style="white-space:normal">
<p dir="auto">On 16 Jul 2016, at 18:41, Stefan Daschek
wrote:</p>
</div>
<div style="white-space:pre-wrap"><blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px"><div dir="auto">So in principle I want to implement a preview command that just strips the frontmatter and then delegates to whatever else preview command would have been normally used, if this bundle would not be installed (like calling `super` in an overridden oop method).
</div></blockquote></div>
<div style="white-space:normal">
<p dir="auto">How many Markdown preview commands are out
there?</p>
</div>
</div>
</blockquote>
<p></p>
</div>
<p style="margin: 1.2em 0px ! important;"></p>
<p style="margin: 1.2em 0px ! important;">There’s at least the one
from <a
href="https://github.com/MikeMcQuaid/GitHub-Markdown.tmbundle/blob/master/Commands/Preview.tmCommand">Markdown
(GitHub)</a> (a bundle I happen to be using :-).</p>
<p style="margin: 1.2em 0px ! important;"></p>
<div class="markdown-here-exclude">
<p></p>
<blockquote
cite="mid:A17AF4F4-3847-4CF2-9B8D-B05A8D4770DC@textmate.org"
type="cite">
<div style="font-family:sans-serif">
<div style="white-space:normal">
<p dir="auto">The default Markdown bundle uses <code
style="background-color:#F7F7F7; border-radius:3px;
margin:0; padding:0 0.4em" bgcolor="#F7F7F7">TM_MARKDOWN</code>
to convert the text to HTML so it can be used with
alternative Markdown processors (I use it with
multimarkdown), so not sure what the motivation would be
to create new preview commands.</p>
</div>
</div>
</blockquote>
<p></p>
</div>
<p style="margin: 1.2em 0px ! important;"></p>
<p style="margin: 1.2em 0px ! important;">Markdown (GitHub) also
uses <code style="font-size: 0.85em; font-family: Consolas,Inconsolata,Courier,monospace;margin: 0px 0.15em; padding: 0px 0.3em; white-space: pre-wrap; border: 1px solid rgb(234, 234, 234); background-color: rgb(248, 248, 248); border-radius: 3px; display: inline;">TM_MARKDOWN</code>,
but defaults to (a bundled version of) <code style="font-size: 0.85em; font-family: Consolas,Inconsolata,Courier,monospace;margin: 0px 0.15em; padding: 0px 0.3em; white-space: pre-wrap; border: 1px solid rgb(234, 234, 234); background-color: rgb(248, 248, 248); border-radius: 3px; display: inline;">redcarpet.rb</code>.</p>
<p style="margin: 1.2em 0px ! important;">After all, I don’t
really want to create a new preview command, I’d rather somehow
“hook into” the existing preview command(s). (My bundle should
only care about stripping the YAML front matter and not impose
its own choice of markdown processor.) So setting <code style="font-size: 0.85em; font-family: Consolas,Inconsolata,Courier,monospace;margin: 0px 0.15em; padding: 0px 0.3em; white-space: pre-wrap; border: 1px solid rgb(234, 234, 234); background-color: rgb(248, 248, 248); border-radius: 3px; display: inline;">TM_MARKDOWN</code>
isn’t really suitable, as far as I understand.</p>
<p style="margin: 1.2em 0px ! important;">Maybe we could introduce
something like <code style="font-size: 0.85em; font-family: Consolas,Inconsolata,Courier,monospace;margin: 0px 0.15em; padding: 0px 0.3em; white-space: pre-wrap; border: 1px solid rgb(234, 234, 234); background-color: rgb(248, 248, 248); border-radius: 3px; display: inline;">TM_MARKDOWN_PREPROCESSOR</code>
into the existing preview commands? With the idea that as long
as this is not set (the default) it does nothing, but if it is
set the document gets piped through this first before being
processed further.</p>
<div
title="MDH:PHA+PGJyPjwvcD48YnI+PGRpdiBjbGFzcz0ibW96LWNpdGUtcHJlZml4Ij5BbSAxNi4wNy4xNiB1bSAyMTo0NCBzY2hyaWViIEFsbGFuIE9kZ2FhcmQ6PGJyPjwvZGl2PjxibG9ja3F1b3RlIGNpdGU9
Im1pZDpBMTdBRjRGNC0zODQ3LTRDRjItOUI4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