Skip to content

Commit d726d12

Browse files
committed
markdown editor
1 parent 7a87189 commit d726d12

923 files changed

Lines changed: 26725 additions & 251 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ gen
99
# Created by .ignore support plugin (hsz.mobi)
1010
target
1111
framework
12-
images
12+
images
13+
node_modules
Lines changed: 271 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,271 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Document</title>
6+
<link rel="stylesheet" href="http://static.xiaomo.info/markdown/basic.css">
7+
<link rel="stylesheet" href="http://static.xiaomo.info/markdown/atelier-dune-dark.css">
8+
<script src="http://static.xiaomo.info/markdown/highlight.min.js"></script>
9+
<script>
10+
hljs.initHighlightingOnLoad();
11+
</script>
12+
</head>
13+
<body>
14+
<p><em>italic</em> <strong>bold</strong>
15+
<em>italic</em> <strong>bold</strong></p>
16+
*******************************************************************************************
17+
<p>An <a href="http://url.com/" title="Title">example</a></p>
18+
<ol>
19+
<li>Foo</li>
20+
<li>Bar</li>
21+
</ol>
22+
*******************************************************************************************
23+
<ul>
24+
<li><p>A list item.</p>
25+
26+
<p>With multiple paragraphs.</p></li>
27+
<li><p>Bar</p></li>
28+
</ul>
29+
*******************************************************************************************
30+
<ul>
31+
<li>Abacus
32+
<ul><li>ass</li></ul></li>
33+
<li>Bastard
34+
<ol><li>bitch</li>
35+
<li>bupkis
36+
<ul><li>BELITTLER</li></ul></li>
37+
<li>burper</li></ol></li>
38+
<li>Cunning</li>
39+
</ul>
40+
*******************************************************************************************
41+
<blockquote>
42+
<p>Email-style angle brackets
43+
are used for blockquotes.</p>
44+
45+
<blockquote>
46+
<p>And, they can be nested.</p>
47+
</blockquote>
48+
49+
<h4>Headers in blockquotes</h4>
50+
51+
<ul>
52+
<li>You can quote a list.</li>
53+
<li>Etc.</li>
54+
</ul>
55+
</blockquote>
56+
*******************************************************************************************
57+
<p><code>&lt;code&gt;</code> spans are delimited
58+
by backticks.</p>
59+
60+
<p>You can include literal backticks
61+
like <code>`this`</code>.</p>
62+
*******************************************************************************************
63+
<p>This is a normal paragraph.</p>
64+
65+
<pre><code>This is a preformatted
66+
code block.
67+
</code></pre>
68+
*******************************************************************************************
69+
<hr />
70+
<pre class="javascript">
71+
<code>
72+
function $initHighlight(block, cls) {
73+
try {
74+
if (cls.search(/\bno\-highlight\b/) != -1)
75+
return process(block, true, 0x0F) +
76+
` class="${cls}"`;
77+
} catch (e) {
78+
/* handle exception */
79+
}
80+
for (var i = 0 / 2; i < classes.length; i++) {
81+
if (checkCondition(classes[i]) === undefined)
82+
console.log('undefined');
83+
}
84+
}
85+
86+
export $initHighlight;
87+
</code>
88+
</pre>
89+
*******************************************************************************************
90+
<p>Roses are red, <br />
91+
Violets are blue.</p>
92+
*******************************************************************************************
93+
<p>This is the first paragraph.</p>
94+
95+
<p>And this is the second.</p>
96+
*******************************************************************************************
97+
<p>Span-level HTML tags -- e.g. <code>&lt;span&gt;</code>, <code>&lt;cite&gt;</code>, or <code>&lt;del&gt;</code></p>
98+
*******************************************************************************************
99+
<h4>Headers in blockquotes</h4>
100+
101+
<ul>
102+
<li>You can quote a list.</li>
103+
<li>Etc.</li>
104+
</ul>
105+
*******************************************************************************************
106+
<p>TODO - is <em>italic</em>underscore_ italic?</p>
107+
*******************************************************************************************
108+
<p>Note that Markdown formatting syntax is not processed within block-level
109+
HTML tags. E.g., you can't use Markdown-style <code>*emphasis*</code> inside an
110+
HTML block.</p>
111+
*******************************************************************************************
112+
<p>Go to <a href="http://www.petebevin.com/">http://www.petebevin.com/</a> and poke around.</p>
113+
*******************************************************************************************
114+
<p>Go to http://www.petebevin.com/ and poke around.</p>
115+
*******************************************************************************************
116+
<p>0 &lt; 1</p>
117+
118+
<table>
119+
<tr>
120+
<td>Hello!</td>
121+
</tr>
122+
</table>
123+
124+
<p>Wasn't that fun!</p>
125+
*******************************************************************************************
126+
<h3 id="philosophy">Philosophy</h3>
127+
128+
<p>Markdown is intended to be as easy-to-read and easy-to-write as is feasible.</p>
129+
130+
<p>Readability, however, is emphasized above all else. A Markdown-formatted
131+
document should be publishable as-is, as plain text, without looking
132+
like it's been marked up with tags or formatting instructions. While
133+
Markdown's syntax has been influenced by several existing text-to-HTML
134+
filters -- including <a href="http://docutils.sourceforge.net/mirror/setext.html">Setext</a>, <a href="http://www.aaronsw.com/2002/atx/">atx</a>, <a href="http://textism.com/tools/textile/">Textile</a>, <a href="http://docutils.sourceforge.net/rst.html">reStructuredText</a>,
135+
<a href="http://www.triptico.com/software/grutatxt.html">Grutatext</a>, and <a href="http://ettext.taint.org/doc/">EtText</a> -- the single biggest source of
136+
inspiration for Markdown's syntax is the format of plain text email.</p>
137+
*******************************************************************************************
138+
<p>To this end, Markdown's syntax is comprised entirely of punctuation
139+
characters, which punctuation characters have been carefully chosen so
140+
as to look like what they mean. E.g., asterisks around a word actually
141+
look like *emphasis*. Markdown lists look like, well, lists. Even
142+
blockquotes look like quoted passages of text, assuming you've ever
143+
used email.</p>
144+
*******************************************************************************************
145+
<p>Don't replace <code>$4</code>...</p>
146+
*******************************************************************************************
147+
<p>This is a normal paragraph.</p>
148+
149+
<pre><code>This is a $4 preformatted
150+
code block.
151+
</code></pre>
152+
*******************************************************************************************
153+
<p>For example, to add an HTML table to a Markdown article:</p>
154+
155+
<pre><code>This is a regular paragraph.
156+
157+
&lt;table&gt;
158+
&lt;tr&gt;
159+
&lt;td&gt;Foo&lt;/td&gt;
160+
&lt;/tr&gt;
161+
&lt;/table&gt;
162+
163+
This is another regular paragraph.
164+
</code></pre>
165+
*******************************************************************************************
166+
<p>For example, to add an HTML table to a Markdown article:</p>
167+
168+
<pre><code>This is a regular paragraph.
169+
170+
&lt;table&gt;
171+
&lt;tr&gt;
172+
&lt;td&gt;Foo&lt;/td&gt;
173+
&lt;/tr&gt;
174+
&lt;/table&gt;
175+
176+
This is another regular paragraph.
177+
</code></pre>
178+
179+
<p>This is not part of the code block.</p>
180+
*******************************************************************************************
181+
<p>Because link names may contain spaces, this shortcut even works for
182+
multiple words in the link text:</p>
183+
184+
<pre><code>Visit [Daring Fireball][] for more information.
185+
</code></pre>
186+
187+
<p>And then define the link:</p>
188+
189+
<pre><code>[Daring Fireball]: http://daringfireball.net/
190+
</code></pre>
191+
192+
<p>Link definitions can be placed anywhere in your Markdown document. I
193+
tend to put them immediately after each paragraph in which they're
194+
used, but if you want, you can put them all at the end of your
195+
document, sort of like footnotes.</p>
196+
*******************************************************************************************
197+
<p>The only restrictions are that block-level HTML elements -- e.g. <code>&lt;div&gt;</code>,
198+
<code>&lt;table&gt;</code>, <code>&lt;pre&gt;</code>, <code>&lt;p&gt;</code>, etc. -- must be separated from surrounding
199+
content by blank lines, and the start and end tags of the block should
200+
not be indented with tabs or spaces. Markdown is smart enough not
201+
to add extra (unwanted) <code>&lt;p&gt;</code> tags around HTML block-level tags.</p>
202+
*******************************************************************************************
203+
<p>This is a normal paragraph.</p>
204+
205+
<pre class="java">
206+
<code>
207+
package org.markdownj;
208+
209+
import java.util.regex.Matcher;
210+
211+
public interface Replacement {
212+
String replacement(Matcher m);
213+
}
214+
</code>
215+
</pre>
216+
*******************************************************************************************
217+
<p>This is a normal paragraph.</p>
218+
219+
<pre class="java">
220+
This is a $4 preformatted
221+
code block.
222+
</pre>
223+
*******************************************************************************************
224+
<p>This is a normal paragraph.</p>
225+
226+
<pre><code>lang:
227+
This is a $4 preformatted
228+
code block.
229+
</code></pre>
230+
*******************************************************************************************
231+
<ul>
232+
<li>a</li>
233+
<li>b</li>
234+
<li>c</li>
235+
</ul>
236+
*******************************************************************************************
237+
<ul>
238+
<li>a</li>
239+
<li>b</li>
240+
<li>c</li>
241+
</ul>
242+
*******************************************************************************************
243+
<ul>
244+
<li>a</li>
245+
<li>b</li>
246+
<li>c</li>
247+
</ul>
248+
*******************************************************************************************
249+
<p>Some of my favourite movies are:</p>
250+
251+
<ul>
252+
<li>Plan 9 From Outer Space</li>
253+
<li>Gigli</li>
254+
<li>Police Academy 6</li>
255+
</ul>
256+
257+
<p>but nobody else likes them.</p>
258+
*******************************************************************************************
259+
<pre class="java">
260+
&lt;code&gt;
261+
package org.markdownj;
262+
263+
import java.util.regex.Matcher;
264+
265+
public interface Replacement {
266+
String replacement(Matcher m);
267+
}
268+
&lt;/code&gt;
269+
</pre>
270+
</body>
271+
</html>

0 commit comments

Comments
 (0)