nicHoch / tca

app bug reporting
4 stars 0 forks source link

Area info tab doesn't respect linebreaks #61

Open DaneEvans opened 3 years ago

DaneEvans commented 3 years ago

The description and Approach fields just end up as a wall of text, this isn't a data problem, the website displays them as paragraphs (eg https://www.thecrag.com/en/climbing/australia/northern-beaches/area/13101841)

Combined with the route stats being in a french only grading system, and a seasonal graph that doesn't offer much, this makes this tab pretty much useless

andrasbari commented 3 years ago

The api response for this node: { "data" : [ [ "area", 13101841, 12010939, null, 3, "Slabs", [ 151.25917384, -33.71404384 ], 66, { "sport" : 55, "toprope" : 1, "trad" : 9, "unknown" : 1 }, [ [ { "Approach" : "The Narrabeen Slabs climbing area is located on the Wakehurst Parkway 700m west of the turn-off for the Sydney Academy of Sport. \n\nDescribed first from the Sydney side:-\nABout 2km North of the traffic lights at Oxfoird Falls are 2 Heavy Vehicle inspection bay signs, parking just before the 2nd one near (but NOT blocking a locked gate) on the shoulder on the left. This is parking area B on the topo. To turn around, go up 200m to the RMS heavy vehicle area or the Academy of Sport.\n\nHeading from the Narrabeen side you will pass the Academy of Sport; then after 500m a large layby on your right; then 200m further on is the access for the crag is at the locked gate on the right (just before the first sweeping lefthand corner). There is enough space on the road shoulder to park opposite the gate on the left side of the road. This is parking area C on the topo.\n\nFrom the gate follow the well established track for 300m, then right and then up the hill.", "Description" : "As the name suggests not only is there plenty of slabby climbing to be had, but there's also quite a few roof routes in the cave at the end. \n\nBring Bolt Plates!\n\nMost routes are sport - on a combination of bolts, fixed hangers and rings. Having said this there are a number of mixed routes, so check your guide before you set off - an occasional cam may be required. Most routes are equipped with lower-offs.\n\nClimate / Conditions\n\nThe cliffline faces south and the sun moves pretty much over head. During the middle of the day you'll be climbing staring into the sun.\n\nThe cliff itself can be quite damp so leave a few days after rain for it to dry out. On a hot day it can be quite humid and mosquitos are ever present. Watch out for leeches.\n\nThe cave at the far end of the crag is permanently dry should it rain." }, 11261683 ] ] ] ] }

@scd We display descriptions like html formatted source code. We can replace \n with <br> but in other descriptions may have a lot of line breaks eg.: <br>\n\n will be converted to <br><br><br>

scd commented 3 years ago

Use markdown standards.

https://daringfireball.net/projects/markdown/

I think there are a couple of things the website has disabled. Here is an explanation of the features on the website:

https://www.thecrag.com/en/article/formattingtext

Note that a single \n does not map to a new paragraph. I is treated the same as a simple space.