2012/11/22 Richard Hipp <[email protected]>:
> Fossil understands check-in comments and ticket text to be Wiki/HTML. Let's
> say that the mimetype is "text/x-fossil-wiki". This approach worked well
> for us on CVSTrac (which was where many of the ideas in Fossil originated)
> because it allowed hyperlinks to other check-ins, tickets, wiki, etc to be
> embedded in the check-in comment text.
I think I would fix that in the comment preprocessor. Before being
committed, comments already have the pre-processing step that
lines starting with '#' are eliminated. So, what of the following
processing would be done in addition:
- All '<', '>', '&', single and double-quotes are translated to their html
equivalent. < > & ' "
- All newlines are translated to '\n<br>' (newline followed by '<br>'),
except for the last newline in the comment.
- Maybe even all spaces translated to and all tabs with
multiple 'es. (I don't really think this is necessary)
Then the comment text is valid html, but will look like plain-text
when viewed, nothing else needs to be changed.
And a configuration option can be introduced whether those two additional
proprocessor steps are wanted for the fossil client or not. No changes at
all to the fossil server.
Advantage:
- Fully upwards/downwards compatible.
- The main problem of having to html-escape the characters manually
is solved: the commit-message preprocessor does it for you.
- no new mime-type has to be used.
- Older commit-messages are displayed unchanged.
- If more elaborate wiki markup is needed, it can always be
edited later in the UI.
Regards,
Jan Nijtmans
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users