Closed oskarrough closed 6 years ago
Now that I am thinking about it, the best would be to parse the bb code and return the appropriate explorer
route.
Right now it opens a lot of links to discogs.
True, I did not consider that. I'd say the easiest would be to write a helper that parses the HTML and replaces discogs.com/xxx
with our paths?
Updated this js regex so it has two capture group, model type
and model id
:
https://regexr.com/3pkgo
Not sure how to remove the tailing slash at the end of the first capture group.
I configured the API to return HTML for "profile" field.
I did it with a computed property on the model that returns whichever profile field is available, prefering HTML or plaintext to the bbcode.
Other models also need it but I did not feel like creating a shared model or component yet. Thoughts?
Example https://deploy-preview-47--explorer-discogs.netlify.com/artists/15885/info