Bug(?): multiple instances of tag within same paragraph not recognized

Hi. First things first: version 3 is a fantastic upgrade!. Thank you so much!

Unfortunately, TaskPaper 3.0.1 seems to have introduced a behavior not present in v.3.0 or v.2.x. When multiple instances of the same tag are found within a paragraph, only the first instance is recognized as a tag – i.e. visually formatted and clickable:

(The sample utilizes valued tags, since using these repeatedly might be a common scenario. The bug, however, applies to all tags.)

Best regards –
Dan

This is by design… tags map to attributes, and attributes can have only a single associated value. With that said I’ve already been convinced that I need to ass some form of support for list values, which would then support this case. But not supported right now.

Ok, thank you. I’ll have to learn to live with it, then.

Still vaguely curious why this used to work differently for so long, though…

It has to do with the internal data representation. Previously each internal “item” has a list of all associated tags. So repeat tags were OK since the list could just hold the repeats.

In version three I’ve changed to using key/value storage to hold tags. This means that I can only associate one value for each tag. I think in the end key/value storage for attributes is better because it’s a more familiar programming model for the scripting API and makes it easier to serialization the object model to XML based formats.

Going forward I also think I can support the old behavior, will just take some more work. For instance in the future I may again allow for multiple tag syntax, but I would just combine those values into a single value. So for your example I would store the result as the attribute:

data-instances: 1,2

Thank you for the exhaustive explanation.