FS#14391 - Wrapping comments in <pre> tags
Attached to Project:
AUR web interface
Opened by Ronuk Raval (rraval) - Sunday, 19 April 2009, 23:03 GMT
Last edited by Lukas Fleischer (lfleischer) - Thursday, 12 July 2012, 06:12 GMT
Opened by Ronuk Raval (rraval) - Sunday, 19 April 2009, 23:03 GMT
Last edited by Lukas Fleischer (lfleischer) - Thursday, 12 July 2012, 06:12 GMT
|
Details
Right now, AUR eats up all whitespace in comments. Examining
the HTML shows that the whitespace is there, and the bug is
caused because of HTML's whitespace agnosticism. This is
particularly annoying when posting a patch, which requires
whitespace before contextual lines. If the leading
whitespace isn't there, 'patch' will reject the diff as
corrupt.
This makes it literally impossible to post patches in comments. Possible fixes include wrapping comment content in HTML <pre> tags, forcing the rendering of whitespace. |
This task depends upon
Closed by Lukas Fleischer (lfleischer)
Thursday, 12 July 2012, 06:12 GMT
Reason for closing: Won't implement
Additional comments about closing: Use a pastebin for posting patches.
Thursday, 12 July 2012, 06:12 GMT
Reason for closing: Won't implement
Additional comments about closing: Use a pastebin for posting patches.
So yeah, if attachments are possible and someone has the time to spare, you are my new hero. Otherwise, I could live with just a few <pre> tags.
More seriously though, could a package not summarize a list of attachments and allow people to flag them out of date? As for rotting patches and PKGBUILDs, AUR already stores comments in it's database. Comments that sometimes contain patches and PKGBUILDs, and are usually outdated in a few weeks. Thus it isn't really much of a storage problem, more of a organizational one.
If the organization is too much to code, like I've said before, I find that the addition of <pre> tags to be an adequate compromise. At least then one can post patches without getting mangled.
And I find it interesting that you mention pastebin. The unified diff format requires that the diff range be specified between double "@" signs, a delimiter that pastebin also uses for its own purposes. Posting a patch to pastebin will mangle it beyond just spaces, it will remove needed delimiters.
> specified between double "@" signs, a delimiter that pastebin also uses for its own purposes. Posting a patch
> to pastebin will mangle it beyond just spaces, it will remove needed delimiters.
Hmm! Your pastebin is faulty. I think it may benefit many people to fix that.
I find myself pasting patches often enough and haven't had problems.
Now, a question remains about the focus of the comments. Do we wish for them do be completely self standing without any reliance on other sites? Personally, I find the pastebin thing to be adequate (now that I've found one that works well enough), but would still prefer all files about an AUR package being kept local to AUR. However, that decision ultimately falls upon the developers.
2.) you can also replace URLs by links - since there are lot of URLs in AUR comments. (it should be nice to replace also URLs in older comments after implementing that)
3.) there is annoying space character added to end of each comment (this should be replaced by something different - eg. line break?)
How far are we with this coming in one of the more soonish applied versions of aur code?
Is there a patch already? are reviews/testing needed?
PKGBUILDs can't be passed additional configuration, as I guess gentoo permits, so patches for aur packages seem kinda plausible.
Many aur packages are extended versions of those in the repos, anyway.
Note that posting a short diff in comments results in broken diff code, as seen in [1].
[1] http://aur.archlinux.org/packages.php?ID=11364
Edit: uh, no idea what package that was, I'm sorry. :)
https://gitorious.org/chakra-webdev/ccr/commit/40a392bf77418c29c84f0f08a19ec1155bae7807
is a tiny change in the CSS and add the proper <pre></pre>, this allows not only post patches but well formatter build logs having a proper text wrap.