#+title: Test of mege code #&summary Code in mege #& #+license: bysa * Test of mege code While the <@eval macros.titlelink('basics')@> does include code, this test contains more. And all of it's different. ** Shown, but not highlighted *** Without formatting Inline: =while [ 1 ] ; do echo y ; done=, simple. : echo Hello : if hello: : print('Hello') : wget *url* #+BEGIN_SRC cond = source and not highlighted #+END_SRC *** With formatting #++pre : wget *url* #&pre *Preformatted* but still [[http://en.wikipedia.org/wiki/Monospace][monospace]] {Escaped}&strong! #& #++pre #+BEGIN_SRC *Preformatted* but still [[http://en.wikipedia.org/wiki/Monospace][monospace]] {Escaped}&emph! #+END_SRC Inline: =while [ 1 ] ; /do/ echo y ; done=&tt, messy. ** Shown and highlighted #++sh : x=32 : echo $x #+BEGIN_SRC python cond = source and highligted print(cond) #+END_SRC Inline: =

abc

=&html. ** HTML #+BEGIN_SRC html
au
#+END_SRC The above code equals: #++show #+BEGIN_SRC html
au
#+END_SRC Inline HTML: <@html strong text@>. ** JavaScript, CSS #+BEGIN_SRC javascript window.addEventListener('load', function(event){ tempobj = document.getElementById('tempobj'); tempobj.addEventListener( 'click', function(event){tempobj.innerHTML += 'A';}, false); }, false); #+END_SRC # Make mege load it #++show #+BEGIN_SRC javascript window.addEventListener('load', function(event){ tempobj = document.getElementById('tempobj'); tempobj.addEventListener( 'click', function(event){tempobj.innerHTML += 'A';}, false); }, false); #+END_SRC ** Eval'd Code Inline code: =<@eval 2 + 3@>= = <@eval 2 + 3@>. Inline code: #&-eval 2 + 3 #& Block code: #¶graph #++eval #+BEGIN_SRC python 2 + 3 #+END_SRC #¶graph #++dexec #+BEGIN_SRC python print('Date:', datetime.datetime.utcnow()) #+END_SRC