Topic: [Issue] DText too strict

Posted under Site Bug Reports & Feature Requests

So this isn’t really a bug per se, but the DText tags for some things are far too strict. For example, if you’re trying to make a custom link, these quotation marks do not work: “” but these, and only these, do: "". The straight quotation marks are not default on most if not all phone and computer keyboards. DText may not directly be your project, but would it be possible to adjust the parser to be a little less strict?

...I just spent half an hour fighting with the link syntax on a tag wiki page before finally noticing the quotation marks.

strikerman said:
Were you writing your text on a word processor like Word by any chance? " is the default, but it gets converted to “” on Word.

https://cmosshoptalk.com/2019/03/19/smart-apostrophes-cmos-6-117/

I was working on the wiki page on my iPhone; however, I’ve never seen any computer program display " instead of “”, including simple ol’ Notepad.

Plus if someone’s writing their text in Word instead of in the nice big beautiful text box on the site they’re doing it wrong IMO. 🤣

bitwolfy said:
It's not the default on iOS, apparently.

"Maybe I turned it off years ago and forgot, but they seem straight on my phone."

bitWolfy

Former Staff

strikerman said: "Maybe I turned it off years ago and forgot, but they seem straight on my phone."

Apparently, smart punctuation has been added in iOS 11.
I myself don't have an iPhone, so I can neither confirm nor deny that the smart punctuation is behind this issue. I got this information from a cursory google search.

bitWolfy

Former Staff

bipface said:
bit of a pain to work on though

Ragel is always fun.
It's just these lines, though, isn't it? And probably line 96, too.

Whether forking and maintaining a repo for just this one issue (that never came up before) is worth the effort is another question entirely.

Kira did mention that there was a desire and long-term goal to switch to bbcode at some point, though. Wouldn't that be nice.

bitwolfy said:
Kira did mention that there was a desire and long-term goal to switch to bbcode at some point, though. Wouldn't that be nice.

I’d honestly prefer Markdown, like on Reddit.

bitWolfy

Former Staff

strikerman said: Tbh it kinda is (as someone who doesn't know any of the deeper technicals).

Yeah, I don't disagree.
BBCode is a lot closer to HTML in structure, and less open to interpretation. It's not a bad thing.
Markdown is entirely comprised of "random punctuation". It makes the unparsed text look a lot cleaner and readable for less technically proficient users, but at the cost of occasionally fucking up the intended formatting.

bitwolfy said:
Yeah, I don't disagree.
BBCode is a lot closer to HTML in structure, and less open to interpretation. It's not a bad thing.
Markdown is entirely comprised of "random punctuation". It makes the unparsed text look a lot cleaner and readable for less technically proficient users, but at the cost of occasionally fucking up the intended formatting.

Once you figure it out though it’s an absolute breeze to use. For one thing, the original issue I ran into with types of quotation marks for links would be fully resolved; a custom link would be written [Text](link). No chance for confusion there.

bitWolfy

Former Staff

carnaxus said:
Once you figure it out though it’s an absolute breeze to use. For one thing, the original issue I ran into with types of quotation marks for links would be fully resolved; a custom link would be written [Text](link). No chance for confusion there.

Markdown has a tendency to fuck up links that have parentheses in their name specifically because of that format. i.e. https://en.wikipedia.org/wiki/Disambiguation_(disambiguation)
BBCode uses the [url=https://some.link.com/]link text[/url] format, which could also potentially break if the link has a square bracket in it, but that is somewhat more rare.
The fact that DText actually accounts for punctuation potentially being at the end of links is actually quite nice, but it's also not infallible. Note that it also failed to account for the parenthesis at the end of the link above.

  • 1