Opened 9 years ago

Closed 9 years ago

#4658 closed (fixed)

documentation of linebreaks filter is too vague

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

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@…> 9 years ago.
maybe something like this
linebreaks.diff (1.6 KB) - added by James Bennett 9 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 9 years ago by Gary Wilson <gary.wilson@…>

Triage Stage: UnreviewedReady for checkin

comment:2 Changed 9 years ago by Chris Beaven

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

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

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.

Changed 9 years ago by Gary Wilson <gary.wilson@…>

Attachment: 4658.diff added

maybe something like this

comment:4 Changed 9 years ago by Gary Wilson <gary.wilson@…>

Has patch: set
Needs documentation: unset

comment:5 Changed 9 years ago by Gary Wilson <gary.wilson@…>

Patch needs improvement: set

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

Changed 9 years ago by James Bennett

Attachment: linebreaks.diff added

comment:6 Changed 9 years ago by James Bennett

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 Changed 9 years ago by Adrian Holovaty

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