diff --git a/app.py b/app.py index be1068e..04fb230 100644 --- a/app.py +++ b/app.py @@ -334,6 +334,10 @@ def after_request(response): g.db.close() return response +@app.context_processor +def _inject_variables(): + return {'site_name': app.config['SITE_NAME']} + @login_manager.user_loader def _inject_user(userid): return User[userid] @@ -618,7 +622,7 @@ _enrich_symbols = [ (r'https?://(?:[A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)*|\[[A-Fa-f0-9:]+\])' r'(?::\d+)?(?:/.*)?(?:\?.*)?(?:#.*)?', 'URL'), (_mention_re, 'MENTION'), - (r'[^\n+]+', 'TEXT'), + (r'[^h\n+]+', 'TEXT'), (r'.', 'TEXT') ] diff --git a/config.py b/config.py index c4ae536..4a13153 100644 --- a/config.py +++ b/config.py @@ -1,4 +1,4 @@ DATABASE = 'coriplus.sqlite' DEBUG = True SECRET_KEY = 'hin6bab8ge25*r=x&+5$0kn=-#log$pt^#@vrqjld!^2ci@g*b' - +SITE_NAME = 'Cori+' diff --git a/templates/base.html b/templates/base.html index 15f48c0..58f0c5e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,7 +1,6 @@
- {% set site_name = "Cori+" %}