Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ def main():
jwt = JWTManager(app)
jwt.user_lookup_loader(lookup_user)

@app.route("/")
def index():
return "PurpleForest backend is running!"

app.add_url_rule("/register", methods=["POST"], view_func=register)
app.add_url_rule("/login", methods=["POST"], view_func=login)

Expand Down
4 changes: 2 additions & 2 deletions front-end/components/bloom.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ const createBloom = (template, bloom) => {
function _formatHashtags(text) {
if (!text) return text;
return text.replace(
/\B#[^#]+/g,
(match) => `<a href="/hashtag/${match.slice(1)}">${match}</a>`
/#([\p{L}0-9_]+)/gu,
(_, tag) => `<a href="/hashtag/${encodeURIComponent(tag)}">#${tag}</a>`
);
}

Expand Down