Code

Opened 7 years ago

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

Download all attachments as: .zip

Change History (9)

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

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

comment:2 follow-up: Changed 7 years ago by SmileyChris

  • Needs documentation set
  • Triage Stage changed from Ready for checkin to Accepted

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 7 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 7 years ago by Gary Wilson <gary.wilson@…>

maybe something like this

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

  • Has patch set
  • Needs documentation unset

comment:5 Changed 7 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 7 years ago by ubernostrum

comment:6 Changed 7 years ago by ubernostrum

  • Keywords sprintsept14 added
  • Triage Stage changed from Accepted to Ready for checkin

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

comment:7 Changed 7 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

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

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.