gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnu-arch-users] Re: arch-tag problem?


From: Miles Bader
Subject: [Gnu-arch-users] Re: arch-tag problem?
Date: Sun, 25 Feb 2007 12:52:51 +0900

Alexander Deruwe <address@hidden> writes:
> <?php /* arch-tag: 17B24542-9529-4E47-A1FB-4F799D873AAF */ ?>
>
> If I change it to read:
>
> <!-- arch-tag: 17B24542-9529-4E47-A1FB-4F799D873AAF -->
>
> Everything works fine.  (But then the arch-tag shows up in my HTML,
> which I'd like to avoid...)
> Did I stumble upon a bug or is this a Feature I Do Not Understand? :)

One issue might be that tla does not know about your file's comment
syntax, and considers the contents of the arch-tag: to extend to the
_end of the line_.  Whitespace at the end of the line is stripped off,
but other whitespace is not (and if you tags inadvertently include
comment end markers, that includes whitespace between the intended tag
and the comment end).

Thus in the above examples, the tags are:

   "17B24542-9529-4E47-A1FB-4F799D873AAF */ ?>"

and 

   "17B24542-9529-4E47-A1FB-4F799D873AAF -->"

In cases where a file uses a bracket-like comment syntax, it's usually a
good idea to put comment ending on a new line to avoid problems.
E.g. In C, I use tags like:

   /* arch-tag: 23c5f366-a5ee-44b7-a3b7-90d6da7fd749
      (do not change this comment) */

However if you already have a bunch of files that inadvertently include
comment end-markers in their tags, you might be stuck, and have to
maintain them ... If you're trying to change the above PHP tag to
HTML syntax, I guess you could do something like:

   <!-- arch-tag: 17B24542-9529-4E47-A1FB-4F799D873AAF */ ?>
        (do not change this comment) -->

[Yuck!]

A long time ago there was discussion of a new tag syntax (with a new
name, probably "arch-id:") which would avoid these issues by using a
quoted string for the actual tag contents, e.g.:

   /* arch-id: "23c5f366-a5ee-44b7-a3b7-90d6da7fd749" */

Would just include the stuff in between quotes in the tag.

That never happened though, and given arch's state, it seems kind of
unlikely to happen in the future.

-Miles

-- 
Quidquid latine dictum sit, altum viditur.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]