Log in

No account? Create an account
LogJam [entries|archive|friends|userinfo]

[ website | LogJam ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

[Dec. 14th, 2002|01:24 pm]
This time, in point-by-point form so you can pick'n'choose the questions you answer.

  1. Using / for italics is nice except it prevents you from writing stuff like "I love/hate it". (Or Unix paths, for that matter, but that could be addressed by point 3 below.) Would requiring a space before the slash but not after for an opening italics and a space after the slash but not before for closing italics be enough? I'm not sure. I dislike heuristics like these because exceptions always appear. My first guess at an exception: how would you write something like, "I said, 'Whatever.'"?
  2. Similarly, trying to automatch quotes is out. As I wrote in a comment: how would you parse "He said, 'Where are you goin'?'"
    (The difficulty is in detecting that the apostrophe following "goin'" is not the closing single quote. You can't rely on punctuation preceding the close quote because you could just put a word in 'singlequotes'.)
  3. We need the equivalent of the TeX "verbatim" environment, in which your text is not interpreted at all. Unfortunately, this is a classic problem in meta because it then prevents you from using the closing verbatim marker within the verbatim text. To copy TeX's style would mean you write something like "#ohello thereo", where the # signals that the next character ("o", here) is the delimiter for the verbatim text, so you can choose it carefully so it doesn't interact with your text. But pound won't work there, will it?
  4. What should the blockquote character be? Structured text uses indentation but that's a bit difficult to type in this sort of editor. (I'm leaning towards tilde.)
  5. What should the monospaced character be? Or...
  6. How about LJ user tags? It'd be fun to link to a user by typing something like "%eru".
  7. How can you type normal HTML tags? Using the verbatim environment? Or should the verbatim environment escape HTML characters?

I'm tempted to just grab one character as the generic LogJam command character (tilde is a good candidate because you shouldn't be using it in normal text), except that starts moving away from simple typing. I think supporting a reasonable subset of HTML and allowing the rest with HTML tags is preferable.

[User Picture]From: decklin
2002-12-14 02:02 pm (UTC)
7. Just another silly TeX-inspired idea... \<, \> and \& for HTML metachars. Then we can allow the rest (and therefore arbitrary markup) to go through unmunged. Does this collide with any expected normal usage?

1. I just typed the following sentences, and realized why they were wrong:

I don't know. I think it makes more sense to require whitespace on either end of *this* or /this/.

Trying to DWIM with punctuiation is just way too hairy. But this presents another problem:

char *c; /* this points not to the original string, but to the *buffer*! */

Now how the hell do you parse that? :-) admittedly, code should probably be in whatever we're calling a verbatim envinronment, but... it's just an example, I'm sure there are other possibilites for unbalanced or ambiguous asterisks. It's the same as slashes, really: note that "/this/." as used above is also a perfectly valid *nix path.

4. We could steal from POD:


text here...


I don't think this is very intuitive if you don't write POD, though. But it is nicely logical.

Another thing to steal could be C<...> markup... we'd probably want different letters, however. U<eru> for eru, perhaps? I would appreciate a quick shortcut for CITE and CODE, at least. V<...> for short verbatim spans? The POD idoiom for verbatim blocks is just to start a paragraph with a space (spaces at the start of subsequent lines are optional), but... i think that could be improved. [[ ... ]] outside the whole paragraph? I don't know.
(Reply) (Thread)
[User Picture]From: ntang
2002-12-14 06:25 pm (UTC)
1.) How about requiring that each individual word be marked? In other words, match for 1 or more whitespace characters, a string, and 1 or more whitespace characters or punctuation: /this/ /is/ /italicized/.

For any other situation, well, the user can suck it up and apply the formatting themselves. ;) Nothing's going to cover every case, the point is just to cover enough to make it easier.

Alternately, for both 1 and 2, you could match on any pairs (with something in-between them), and then require users to escape any other use of them. So, "He said, 'Where are you goin\'?'" or something similar. And then I love\/hate it. What/ever/. /// would simply look like /// (since there's nothing in-between any of them, and just make sure it's not a greedy match).

7.) I think that in verbatim "mode", html shouldn't be escaped, otherwise there's no way to format things at all in verbatim mode.

However, worth considering is making structured mode escape html by default - so to type html you'd just enclose it in the verbatim tags. If you're going to do something like that, then you'd probably want to expand structured mode to allow you to do more sorts of automatic html insertion (like a and img tags and other common ones).

As far as how to enable verbatim: what about <!-- --> or something similar? It's easy to remember, should be reasonably easy to parse, and I can't think of any cases of people using actual html comments in LJ (are they even allowed?).
(Reply) (Thread)
[User Picture]From: chirik
2002-12-14 08:41 pm (UTC)
I only have one comment on this:

Make this a preferences feature, where ALL of this added stuff can be turned off, and it'll work just like it does, now. (Maybe that's the case already in CVS?) I have no problem typing my special stuff in using HTML, and don't want the program guessing what I'm trying to say.
(Reply) (Thread)