if ($word =~ m/[:upper:]+[:lower:]+([:upper:]+[:lower:]+)+/) {
$word = "<a href=\"${somePrefix}${word}\">${word}</a>"
}
or something to that effect. if ($word =~ m/[:upper:]+[:lower:]+([:upper:]+[:lower:]+)+/) {
$word = "<a href=\"${somePrefix}${word}\">${word}</a>"
}
or something to that effect.It’s a small world. The more you know.
Also I have enjoyed listening to people complain about our [[creation]] for decades.
We had reasons. We already had clean syntax for [https://uri text description] and [https://uri] for numbered citations as footnotes and [#anchor] for named anchors that fit this format of square brackets for everything.
The double square brackets made it clear the inner tokens were not to be parsed at all but were the link itself. Plus they are fast to type and very easy to identify (they look like a [[button]]) and read cleanly as part of a sentence.
Wdym
So, you limit the text that user generated content is allowed to use. And yet, you still need to figure out a way to allow links between pages within the site - but not allow the person to use an <a> tag.
The way c2 did it was with MixedCaseWords that were easy for a regex to pick out and create link targets to.
MixedCaseWords required no additional special characters to be used or worry about unmatched character pairs.
[[[a link] with some more text and [[something else]]
Getting into parsing means more complex code and with that complexity comes for the possibility of bugs.This was also at the time of the Cambrian explosion of Web 2.0 and user content. Lots of different sites took different approaches to handling it. The CamelCase link approach reads kind of clunky but is likely elegantly simple in implementation.
C2 was from the very early days and something that works, well, it works. Going to a full on sanitizer and larger set of allowed html leads forever chasing bugs and implementing features.
Compare also HN and the rather limited feature set. It is better to have something that works and move on rather than forever implementing features (often with backwards compatibility breaking cases).