Opened 17 years ago

Closed 17 years ago

#4658 closed (fixed)

documentation of linebreaks filter is too vague

Reported by: Gary Wilson <gary.wilson@…> Owned by: nobody
Component: Documentation Version: dev
Severity: Keywords: sprintsept14
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

Currently it reads: Converts newlines into <p> and <br /> tags.

It should be something more like: Converts newlines to <br /> tags and wraps the resulting string in a <p> tag.

Note: the docstring of this filter's Python function is also vague and also should be changed.

Attachments (2)

4658.diff (661 bytes ) - added by Gary Wilson <gary.wilson@…> 17 years ago.
maybe something like this
linebreaks.diff (1.6 KB ) - added by James Bennett 17 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 by Gary Wilson <gary.wilson@…>, 17 years ago

Triage Stage: UnreviewedReady for checkin

comment:2 by Chris Beaven, 17 years ago

Needs documentation: set
Triage Stage: Ready for checkinAccepted

Your suggestion is no more clearer. It doesn't just wrap the whole string in one <p>, it breaks multi-newlines into <p>s

in reply to:  2 comment:3 by Gary Wilson <gary.wilson@…>, 17 years ago

Replying to SmileyChris:
It doesn't just wrap the whole string in one <p>, it breaks multi-newlines into <p>s

Now that was a case that I did not try. Good thing we are fixing the documentation :)

How about we stick an example in there.

by Gary Wilson <gary.wilson@…>, 17 years ago

Attachment: 4658.diff added

maybe something like this

comment:4 by Gary Wilson <gary.wilson@…>, 17 years ago

Has patch: set
Needs documentation: unset

comment:5 by Gary Wilson <gary.wilson@…>, 17 years ago

Patch needs improvement: set

I think the wording could still be improved, and I forgot to change the docstring.

by James Bennett, 17 years ago

Attachment: linebreaks.diff added

comment:6 by James Bennett, 17 years ago

Keywords: sprintsept14 added
Triage Stage: AcceptedReady for checkin

Added a patch with hopefully clearer documentation for both linebreaks and linebreaksbr, as well as updated docstrings to match.

comment:7 by Adrian Holovaty, 17 years ago

Resolution: fixed
Status: newclosed

(In [6223]) Fixed #4658 -- Improved documentation of linebreaks and linebreaksbr. Thanks, ubernostrum and Gary Wilson

Note: See TracTickets for help on using tickets.
Back to Top