c2corg / v6_api

REST API for https://www.camptocamp.org
GNU Affero General Public License v3.0
22 stars 25 forks source link

Implement new LTag aliases: C# and V# for crag climbing routes #1860

Open bohwaz opened 3 weeks ago

bohwaz commented 3 weeks ago

This commit adds two new syntaxes for tables of lines, intended for use with crag climbing routes:

V#1 | Name A | 6a+
C#2 | Name B | 5b

V is for "Voie", C is for "Climb", as R (could be used for Route) is already used for "Relay" and L (could mean "Line") is used for "Longueur".

When transformed to HTML, the V or C is removed, resulting in this:

- - -
1 Name A 6a+
2 Name B 5b

(Table header added here to make it work with Github markdown syntax)

Apart from this, there is no difference with the handling of regular R# and L# tags.

This is useful for writing topos for regular crags, where a climb can have multiple lengths (longueurs) and relays. It's closer to what you would find in topo guidebooks.

I added a new test to make sure the aliases work properly.