Django

Code

Ticket #4658 (closed: fixed)

Opened 1 year ago

Last modified 1 year ago

documentation of linebreaks filter is too vague

Reported by: Gary Wilson <gary.wilson@gmail.com> Assigned to: nobody
Milestone: Component: Documentation
Version: SVN Keywords: sprintsept14
Cc: Triage Stage: Ready for checkin
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 1

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

4658.diff (0.6 kB) - added by Gary Wilson <gary.wilson@gmail.com> on 06/21/07 20:13:31.
maybe something like this
linebreaks.diff (1.6 kB) - added by ubernostrum on 09/14/07 16:27:42.

Change History

06/21/07 19:02:08 changed by Gary Wilson <gary.wilson@gmail.com>

  • needs_better_patch changed.
  • stage changed from Unreviewed to Ready for checkin.
  • needs_tests changed.
  • needs_docs changed.

(follow-up: ↓ 3 ) 06/21/07 19:24:28 changed by SmileyChris

  • needs_docs set to 1.
  • 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

(in reply to: ↑ 2 ) 06/21/07 20:12:10 changed by Gary Wilson <gary.wilson@gmail.com>

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.

06/21/07 20:13:31 changed by Gary Wilson <gary.wilson@gmail.com>

  • attachment 4658.diff added.

maybe something like this

06/21/07 20:16:19 changed by Gary Wilson <gary.wilson@gmail.com>

  • needs_docs deleted.
  • has_patch set to 1.

06/21/07 20:22:31 changed by Gary Wilson <gary.wilson@gmail.com>

  • needs_better_patch set to 1.

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

09/14/07 16:27:42 changed by ubernostrum

  • attachment linebreaks.diff added.

09/14/07 16:28:24 changed by ubernostrum

  • keywords set to sprintsept14.
  • 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.

09/14/07 16:46:38 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #4658 (documentation of linebreaks filter is too vague)




Change Properties
Action