Weird little quirk

I have a usable workaround, so I don't need a solution, but I thought I'd share this weird little quirk. I don't recall seeing this discussed before. I'm curious whether others can reproduce this result.

I had a table that wouldn't produce any output even though it truly seemed like it should. It was just a bunch of lines of plain text, nothing fancy. I finally wound up experimenting with EndTable: in various spots until I homed in on the problem line: elder-born:

When I removed or commented out that line (only) from the table, the table produced output as expected. When I included the line, the table didn't produce any output. This small example reproduces the problem.

Table: X
this
elder-born:aha
that

It's a weird one. If I change the offending string to elderborn, elder-bored, elder, elderly, elder-schmelder, elder-born:, and other variations, the table works fine. If I use elder-borne, elder-ly, e-born, e-mail, e-ieio, weird-born, weird-ly, e-, just a dash, or seemingly any letter followed by a dash (all of these examples followed by a colon), the table stops yielding any output. The dash and the colon are apparently necessary to reproduce this, although as I just noted, there are strings using a dash and a colon that don't have this problem.

For the case in hand, elder-born: gives me the result I'm after, so I don't need a fix. I typically replace colons in text with : anyway because of occasional IPP syntax issues.

Comments

  • Oops. I added elder-borne to the wrong list. elder-borne: works but elder-born: doesn't. I should also note that changing the : to : with any of those examples works fine, so that's my solution.

  • Hmm, interesting. It must be something about dictionary keys breaking when they contain a dash. elder-borne: works because dictionary keys can only be 10 characters, therefore elder-borne: is not considered a dictionary key, since the colon has too many characters in front of it. But any time you have a colon in the first 11 characters of a line, it's going to be interpreted as a dictionary key.

    I tried + and = and / in place of - but only the dash gives the issue.

  • Yeah, it seems related to the 10-character limit for dictionary keys. And only if there's a dash in it. Good catch.

    I've been bitten by the "looks like a dictionary key" problem before, which is why I often use : in the text, but I haven't seen it disable all table output like that before.

  • Yes, that's due to the dictionary keys. If its within the first 10 characters it assumes its intended to be a dictionary key. Its probably disabling output because its switching the table into dictionary mode, so they calls to it are failing. Or something like that.

  • I may have missed something. Is that a dictionary table? My thought is that it was the colon. You don't have a type for the table, so it automatically assumes it's weighted. The weight you gave it (it's looking for a number) is a string, no? It's trying evaluate elder-born as a weight. That seems like the problem to me, but I could be off here.

Leave a Comment