tsackton / taelgar

0 stars 0 forks source link

Bug: linktext doesn't work properly on place pages #28

Closed tsackton closed 9 months ago

tsackton commented 9 months ago

Recording this here to remember it is a minor issue to solve at some point.

Because the default place-place linktext is "", the "home location" on a place note doesn't have the initial linkText. E.g., you get: "A desert the Desolation of Cha'mutte" not "A desert in the Desolation of Cha'mutte".

A simple solution if slightly unsatisfying solution would be to just put the "in" in the format string for places, since you probably never want anything except "in" for the place whereabouts line. A more complicated solution would be to have different link text for the first and subsequent elements in a chain. E.g. place-place is "in" for the first step, and "" for subsequent steps.

msackton commented 9 months ago

I have some code that changes "q" to mean "add preposition if different from previous" which basically fixes the issue. You still get ins, but usually it feels natural, i.e.

Currently sailing to Wahacha, in the Vermillion Isles

(which is nicer or as nice, IMO, as Currently sailing to Wahacha, the Vermillion Isles)

The only question I had was whether I should change q, or should we introduce a new format string for this case and leave q alone?

Basically three options: 1) change the behavior of q to mean "link text if different" and nothing else 2) change the behavior of q to mean "link text if different" and also introduce a new formatter for "link text always" 3) keep the behavior of q (link text always) and add a new formatter for "link text if different"

The PR here: https://github.com/tsackton/taelgar/pull/29 implements option 2 using "v" as the new formatter.

tsackton commented 9 months ago

I think 2 is fine. If we run out of formatter codes we can consider a cleanup but for now no reason not to see if we use things first.

msackton commented 9 months ago

Fixed by #29