<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -112,6 +112,17 @@ class RequestHandler(object):
         try:
             path_to_doc = &quot;%s%s%s&quot;%(self.path_to_document_dir, os.sep, path)
             if 'action_create_file' in http_args.keys():
+                #
+                # Check the directory exists and create it if it doesn't
+                path_tokens = path_to_doc.split(os.sep)[:-1]
+                dirname = os.sep.join( path_tokens )
+                if os.path.exists(dirname) and not os.path.isdir(dirname):
+                    print &quot;EE Expecting difficulties: %s exists but is not a directory.&quot;%dirname
+                elif not os.path.exists(dirname):
+                    print &quot;** No dir %s. Attempt to create&quot;%dirname
+                    os.mkdir(dirname)
+                    print &quot;-&gt; Success&quot;
+                # Now create the file itself
                 f_ptr = open(path_to_doc, 'w+')
                 f_ptr.write('\n')
                 raise cherrypy.HTTPRedirect('/edit/%s'%'/'.join(lst_path))
@@ -475,6 +486,7 @@ def html_display_dir(target_dir, url_relpath):
         &lt;/div&gt;
     &quot;&quot;&quot;%(title_str, url_relpath))
     sb.append( html_breadcrumb(url_relpath) )
+    sb.append('&lt;br /&gt;')
     sb.append('&lt;div class=&quot;contentbox&quot;&gt;')
     sb.append('&lt;p class=&quot;wordish_title&quot;&gt;/%s&lt;/p&gt;'%url_relpath)
     sb.append('&lt;hr /&gt;')
@@ -641,10 +653,23 @@ def html_display_page(doc_path, static_path, fname, print_header=True):
         
         elif doctype == 'mnml':
             try:
-                b_new_para=True
-                b_in_para=False
-                listlevel=0
-                for line in content.split('\n'):
+                class ParagraphTracker(object):
+                    def __init__(self):
+                        self.b_new_para=True
+                        self.b_in_para=False
+                        self.listlevel=0
+                pt = ParagraphTracker()
+                mnml_lines = content.split('\n')
+                def unwrap():
+                    &quot;This is what we do to close off a block.&quot;
+                    while pt.listlevel&gt;0:
+                        sb.append('&lt;/ul&gt;')
+                        pt.listlevel-=1
+                    if pt.b_in_para:
+                        sb.append('&lt;/p&gt;')
+                        pt.b_new_para = True
+                        pt.b_in_para = False
+                for idx, line in enumerate(mnml_lines):
                     if line.startswith('TITLE: '):
                         sb.append('&lt;p class=&quot;wordish_title&quot;&gt;%s&lt;/p&gt;'%' '.join(line.split(' ')[1:]))
                         sb.append(&quot;&lt;hr /&gt;&quot;)
@@ -661,7 +686,7 @@ def html_display_page(doc_path, static_path, fname, print_header=True):
                     elif line.startswith('*'):
                         #
                         # Use voodoo to get the ul indent to be right
-                        w_listlevel = listlevel
+                        w_listlevel = pt.listlevel
                         new_listlevel = 0
                         split_on_stars = line.split('*')
                         while split_on_stars[0] == '':
@@ -673,22 +698,16 @@ def html_display_page(doc_path, static_path, fname, print_header=True):
                         while w_listlevel&gt;new_listlevel:
                             sb.append('&lt;/ul&gt;')
                             w_listlevel-=1
-                        listlevel = new_listlevel
+                        pt.listlevel = new_listlevel
                         #
                         # Now that the listlevel is right, output this line in it
-                        sb.append('&lt;li&gt;%s&lt;/li&gt;'%line[listlevel:].strip())
+                        sb.append('&lt;li&gt;%s&lt;/li&gt;'%line[pt.listlevel:].strip())
                     elif line.strip() == '':
-                        while listlevel&gt;0:
-                            sb.append('&lt;/ul&gt;')
-                            listlevel-=1
-                        if b_in_para:
-                            sb.append('&lt;/p&gt;')
-                            b_new_para = True
-                            b_in_para = False
+                        unwrap()
                     else:
-                        b_in_para = True
-                        if b_new_para:
-                            b_new_para = False
+                        pt.b_in_para = True
+                        if pt.b_new_para:
+                            pt.b_new_para = False
                             sb.append('&lt;p style=&quot;wordish_p&quot;&gt;')
                         wiki_simple_links_pattern = re.compile('\[\[.*\]\]')
                         wiki_bar_links_pattern = re.compile('\[\[.*|.*\]\]')
@@ -713,6 +732,8 @@ def html_display_page(doc_path, static_path, fname, print_header=True):
                             sb_line.append(remainder)
                             line = ''.join(sb_line)
                         sb.append(line)
+                # Make sure we've closed everything off in this block
+                unwrap()
             except Exception, e:
                 # xxx
                 print dir(e)
@@ -795,7 +816,7 @@ def html_edit_page(doc_path, fname, error=None):
         %s
         &lt;h1 class=&quot;wordish_h1&quot;&gt;Editing %s&lt;/h1&gt;
         &lt;form method=&quot;POST&quot; action=&quot;/save/%s&quot; enctype=&quot;multipart/form-data&quot;&gt;
-            &lt;textarea rows=&quot;30&quot; cols=&quot;120&quot; name=&quot;wiki_content&quot;&gt;%s&lt;/textarea&gt;
+            &lt;textarea rows=&quot;20&quot; cols=&quot;100&quot; name=&quot;wiki_content&quot;&gt;%s&lt;/textarea&gt;
             &lt;br /&gt;
             &lt;input name=&quot;action_save&quot; type=&quot;submit&quot; value=&quot;Save&quot; /&gt;
             &lt;input name=&quot;action_cancel&quot; type=&quot;submit&quot; value=&quot;Cancel&quot; /&gt;
@@ -848,7 +869,7 @@ def html_breadcrumb(url_relpath):
     path_as_list = url_relpath.split('/')
     for idx, path_component in enumerate(path_as_list):
         cumulative_path = '/'.join( path_as_list[0:idx+1] )
-        sb.append(' &gt; &lt;a href=&quot;/%s&quot;&gt;%s&lt;/a&gt;'%(cumulative_path, path_component))
+        sb.append(' &amp;gt; &lt;a href=&quot;/%s&quot;&gt;%s&lt;/a&gt;'%(cumulative_path, path_component))
     sb.append('&lt;/div&gt;')
     return '\n'.join( sb )
 </diff>
      <filename>Steamdoc.py</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,5 @@
 [global]
-server.socket_host = &quot;127.0.0.1&quot;
-#server.socket_host = &quot;10.1.3.132&quot;
-#server.socket_host = '192.168.2.3'
+server.socket_host = &quot;0.0.0.0&quot;
 server.socket_port = 8060
-server.thread_pool = 1
+server.thread_pool = 5
 tools.sessions.on = True</diff>
      <filename>cherrypy.conf</filename>
    </modified>
    <modified>
      <diff>@@ -408,8 +408,8 @@ h5.wordish_h5 {
 }
 
 textarea {
-    width: 920px;
-    height: 569px;
+    width: 710px;
+    height: 530px;
     border: 4px solid #cccccc;
     padding: 5px;
     font-family: Courier, sans-serif;</diff>
      <filename>steamdoc.css</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,3 @@
-content_dir=/Users/craig/foundry/blog_steamdoc
-static_dir=/Users/craig/foundry/blog_steamdoc/static
+content_dir=/home/craig/seq/00000.doc
+static_dir=/home/craig/seq/00000.doc/static
 title_string=Steamdoc</diff>
      <filename>steamdoc.properties</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d7d3c391a26c8e43c299b54ba968a748e2ab3b9c</id>
    </parent>
  </parents>
  <author>
    <name>craig</name>
    <email>craig@bump.localdomain</email>
  </author>
  <url>http://github.com/cratuki/steamdoc/commit/96ccc14c6fa1d3e85a6bc040894748767b27cf81</url>
  <id>96ccc14c6fa1d3e85a6bc040894748767b27cf81</id>
  <committed-date>2008-12-31T07:54:12-08:00</committed-date>
  <authored-date>2008-12-31T07:54:12-08:00</authored-date>
  <message>Lists weren't closing at the end of a mnml block - fixed.
If you try to create a doc in a directory that doesn't exist, it now tries to create the directory first.
Adjusted the edit table - was too big for my liking</message>
  <tree>09cd3f31046d68de5715a34b1360560cb0801f5d</tree>
  <committer>
    <name>craig</name>
    <email>craig@bump.localdomain</email>
  </committer>
</commit>
