def test_inlinecode(self): text = '=inline text=' o = Org(text) eq_(o.html(), '<p><code>inline text</code></p>') text = '=/inline italic text/=' o = Org(text) eq_(o.html(), '<p><code>/inline italic text/</code></p>') text = '=<tag>=' o = Org(text) eq_(o.html(), '<p><code><tag></code></p>')
def test_html(self): text = '''* header1 paraparapara ** header2-1 [[image]] para*para*2[[http://example.com][hyperlink]] ** header2-2 | a | b | | 1 | 2 | *** header3-1 #+BEGIN_QUOTE quoted =quoted_decorated= #+END_QUOTE *** header3-2 #+BEGIN_SRC python python code =hoge= #+END_SRC''' o = Org(text) eq_( o.html(), '<h1>header1</h1><p>paraparapara</p><h2>header2-1</h2><p><img src="image">para<span style="font-weight: bold;">para</span>2<a href="http://example.com">hyperlink</a></p><h2>header2-2</h2><table><tr><td>a</td><td>b</td></tr><tr><td>1</td><td>2</td></tr></table><h3>header3-1</h3><blockquote>quoted<code>quoted_decorated</code></blockquote><h3>header3-2</h3><pre><code class="python">python code=hoge=</code></pre>' )
def test_slide_heading_html(self): text = '''* header1 paraparapara ** header2-1 [[image]] para*para*2[[http://example.com][hyperlink]] ** header2-2 | a | b | | 1 | 2 | *** header3 #+BEGIN_QUOTE quoted #+END_QUOTE''' o = Org(text, default_heading=2) eq_( o.html(), '<h2>header1</h2><p>paraparapara</p><h3>header2-1</h3><p><img src="image">para<span style="font-weight: bold;">para</span>2<a href="http://example.com">hyperlink</a></p><h3>header2-2</h3><table><tr><td>a</td><td>b</td></tr><tr><td>1</td><td>2</td></tr></table><h4>header3</h4><blockquote>quoted</blockquote>' )