DavidCain / mitoc-trips

The MIT Outing Club's trip management system
https://mitoc-trips.mit.edu
GNU General Public License v3.0
43 stars 9 forks source link

Trip summary page: strip Markdown rather than showing as raw text #78

Closed anishathalye closed 2 years ago

anishathalye commented 2 years ago

In the simple_trip_list, it would be nice to convert this to plain text rather than showing the raw markdown text:

Screen Shot 2022-10-04 at 1 22 40 PM
DavidCain commented 2 years ago

Yeah, apologies - I've been ignoring this ugliness for many years. The reason we don't just naively convert the Markdown to HTML on the fly is that parsing Markdown to HTML or plain text (for many trips at once) can be quite slow.

I solved the problem instead by giving trip leaders the ability to enter their own short summary of the trip. I wrote a simple description for the ~20 trips which are presently open. For all old trips, we just take the first 80 characters of the Markdown text (i.e. images, links, and formatting stripped).

You can check it out at https://mitoc-trips.mit.edu/trips/

Let me know if that works!

anishathalye commented 2 years ago

Neat, I didn't know performance was the reason this feature wasn't supported. Thank you for the fix!