crempp / mdweb

Markdown based web site framework.
http://mdweb.chadrempp.com/
MIT License
11 stars 1 forks source link

the characters '/*/' in the markdown confuses the meta-inf parser #47

Closed crempp closed 4 years ago

crempp commented 8 years ago

If you try to include the characters /*/ anywhere in the markdown the metainf parser blows up.

e.g.

[asdf](https://web.archive.org/web/*/http://site.com)

produces this error

Traceback (most recent call last):
  File "/Users/crempp/.virtualenvs/lapinlabs/lib/python3.5/site-packages/gunicorn/arbiter.py", line 557, in spawn_worker
    worker.init_process()
  File "/Users/crempp/.virtualenvs/lapinlabs/lib/python3.5/site-packages/gunicorn/workers/base.py", line 126, in init_process
    self.load_wsgi()
  File "/Users/crempp/.virtualenvs/lapinlabs/lib/python3.5/site-packages/gunicorn/workers/base.py", line 136, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/Users/crempp/.virtualenvs/lapinlabs/lib/python3.5/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/Users/crempp/.virtualenvs/lapinlabs/lib/python3.5/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
    return self.load_wsgiapp()
  File "/Users/crempp/.virtualenvs/lapinlabs/lib/python3.5/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/Users/crempp/.virtualenvs/lapinlabs/lib/python3.5/site-packages/gunicorn/util.py", line 357, in import_app
    __import__(module)
  File "/Users/crempp/projects/lapinlabs/wsgi.py", line 39, in <module>
    app_options={}
  File "/Users/crempp/projects/lapinlabs/mdweb/MDSite.py", line 107, in __init__
    self.start()
  File "/Users/crempp/projects/lapinlabs/mdweb/MDSite.py", line 134, in start
    self.navigation = Navigation(self.config['CONTENT_PATH'])
  File "/Users/crempp/projects/lapinlabs/mdweb/Navigation.py", line 135, in __init__
    self._scan()
  File "/Users/crempp/projects/lapinlabs/mdweb/Navigation.py", line 221, in _scan
    self.child_navs.append(Navigation(filepath, self.level + 1))
  File "/Users/crempp/projects/lapinlabs/mdweb/Navigation.py", line 135, in __init__
    self._scan()
  File "/Users/crempp/projects/lapinlabs/mdweb/Navigation.py", line 206, in _scan
    page = Page(self._root_content_path, filepath)
  File "/Users/crempp/projects/lapinlabs/mdweb/Page.py", line 67, in __init__
    self.meta_inf = PageMetaInf(meta_inf_string)
  File "/Users/crempp/projects/lapinlabs/mdweb/Page.py", line 25, in __init__
    super(PageMetaInf, self).__init__(meta_string)
  File "/Users/crempp/projects/lapinlabs/mdweb/BaseObjects.py", line 39, in __init__
    self._parse_meta_inf(meta_string)
  File "/Users/crempp/projects/lapinlabs/mdweb/BaseObjects.py", line 74, in _parse_meta_inf
    raise PageMetaInfFieldException("Unsupported field '%s'" % key)
crempp commented 4 years ago

I'm going to refactor to change the meta-inf delimiters from

/*

*/

to

```metainf
```