update from sparkleup
This commit is contained in:
parent
316edd235e
commit
aae4f88b96
|
@ -0,0 +1,91 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Zk | Editing Markdown Extension</title>
|
||||
<link rel="stylesheet" type="text/css" href="/style.css" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<meta charset="utf-8" />
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<header>
|
||||
<h1>Zk | Editing Markdown Extension</h1>
|
||||
</header>
|
||||
<article class="content">
|
||||
<p><span class="tag">tech</span> <span class="tag">markdown</span> <span class="tag">vimwiki</span> <span class="tag">python</span> <span class="tag">package</span></p>
|
||||
<h2 id="what-it-does">What it does</h2>
|
||||
<p>I want to be able to have editing comments in Markdown, so I came up with some extensions to the syntax. The goal should be for the text to still be at least mostly readable.</p>
|
||||
<ul>
|
||||
<li>Additions <code>+{new text}</code></li>
|
||||
<li>Deletions <code>-{old text}</code></li>
|
||||
<li>Substitutions <code>~{old}{new}</code></li>
|
||||
<li>Comments <code>?{la de da}(comment)</code></li>
|
||||
<li>Resolutions <code>!{-{bad wolf}}(STET)</code></li>
|
||||
<li>Metadata:<ul>
|
||||
<li>Comments on all types in parentheses after <code>~{old}{new}(comment)</code> etc</li>
|
||||
<li>Attribution in parentheses in comment <code>+{new}(comment (Commenter))</code></li>
|
||||
<li>Date with attribution <code>-{old}(comment (Commenter 2020-04-21))</code></li>
|
||||
<li>Comment as footnote <code>?{la de da}(^note) ... (^note) comment</code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<p>She ~{brushed}{stroked}(I like this better. Attribution with date. (Makyo 2020-04-21)) her fingers +{softly}(Adverbs! Optional attributions!) along the edges of cabinet doors. Each !{-{one}(Do not want. Optional date (Makyo))}(STET (Makyo 2020-04-21)) was opened and inspected, leaving her standing on tiptoes to peer in those above the counters. Nothing but cups and glasses, plates and bowls, cutting boards and pots and pans and trays and dishes. ?{All clean and neatly stacked.}(^note)</p>
|
||||
</blockquote>
|
||||
<p>(^note) Are you sure about this? Note at bottom of document (Makyo 2020-04-21)</p>
|
||||
<h2 id="how-to-use-it">How to use it</h2>
|
||||
<div class="codehilite"><pre><span></span><code><span class="n">default_config</span> <span class="o">=</span> <span class="p">{</span>
|
||||
<span class="s1">'tag_tuple'</span><span class="p">:</span> <span class="p">(</span><span class="s1">'<div class="verse">'</span><span class="p">,</span> <span class="s1">'</div>'</span><span class="p">),</span>
|
||||
<span class="p">}</span>
|
||||
<span class="n">my_config</span> <span class="o">=</span> <span class="p">{</span>
|
||||
<span class="s1">'tag_tuple'</span><span class="p">:</span> <span class="p">(</span><span class="s1">'<verse>'</span><span class="p">,</span> <span class="s1">'</verse>'</span><span class="p">),</span>
|
||||
<span class="p">}</span>
|
||||
<span class="n">markdown</span><span class="p">(</span><span class="n">source</span><span class="p">,</span> <span class="n">extensions</span><span class="o">=</span><span class="p">[</span><span class="n">VerseExtension</span><span class="p">(</span><span class="o">**</span><span class="n">my_config</span><span class="p">)])</span>
|
||||
</code></pre></div>
|
||||
|
||||
|
||||
<h2 id="where-to-get-it">Where to get it</h2>
|
||||
<ul>
|
||||
<li><a href="https://pypi.com/project/markdown-verse">PyPI</a></li>
|
||||
<li><a href="https://github.com/makyo/markdown-verse">Github</a></li>
|
||||
</ul>
|
||||
<span class="control">Expand all</span>
|
||||
</article>
|
||||
<footer>
|
||||
<p>Page generated on 2020-04-21</p>
|
||||
</footer>
|
||||
</main>
|
||||
<script type="text/javascript">
|
||||
document.querySelectorAll('li').forEach(el => {
|
||||
if (el.querySelectorAll('li').length !== 0) {
|
||||
el.classList.add('has-nested', 'closed');
|
||||
el.innerHTML = `<span class="toggle"></span> ${el.innerHTML}`;
|
||||
}
|
||||
});
|
||||
document.querySelectorAll('.toc .has-nested').forEach(el => {
|
||||
el.classList.remove('has-nested', 'closed');
|
||||
});
|
||||
document.querySelectorAll('li.has-nested').forEach(el => {
|
||||
el.querySelector('.toggle').addEventListener('click', () => {
|
||||
el.classList.toggle('closed');
|
||||
});
|
||||
});
|
||||
let expanded = false;
|
||||
document.querySelector('.control').addEventListener('click', (e) => {
|
||||
expanded = !expanded;
|
||||
if (expanded) {
|
||||
e.target.innerText = 'Collapse all';
|
||||
} else {
|
||||
e.target.innerText = 'Expand all';
|
||||
}
|
||||
document.querySelectorAll('.has-nested').forEach((el) => {
|
||||
if (expanded) {
|
||||
el.classList.remove('closed');
|
||||
} else {
|
||||
el.classList.add('closed')
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue