Opened 10 years ago

Closed 10 years ago

#11263 closed defect (fixed)

Markup ".. link" is wrong in the developer guide. Add ".. linkall" to systematically link.

Reported by: hivert Owned by: hivert
Priority: major Milestone: sage-4.7.1
Component: documentation Keywords: developer link skip markup
Cc: jhpalmieri Merged in: sage-4.7.1.alpha1
Authors: Florent Hivert Reviewers: John Palmieri
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by hivert)

The developer guide says:

To link together verbatim environments, use the .. link:: comment.

whereas the correct markup is .. link without :: same for .. skip

I also add a new markup .. linkall which doesn't split the various block anymore.

Apply

Attachments (4)

trac_11263-doctests_link_all-fh.patch (1.5 KB) - added by hivert 10 years ago.
trac_11263-doctests_link_all-SAGE.local.bin-fh.patch (1.6 KB) - added by hivert 10 years ago.
trac_11263-second.patch (2.4 KB) - added by jhpalmieri 10 years ago.
apply on top of trac_11263-doctests_link_all-fh.patch
trac_11263-doctests_link_all-FOLDED-fh.patch (2.8 KB) - added by hivert 10 years ago.

Download all attachments as: .zip

Change History (17)

comment:1 Changed 10 years ago by hivert

  • Cc palmieri added

Hi John,

This is a long standing one... In http://groups.google.com/group/sage-devel/browse_thread/thread/cdeed06311378df0?pli=1 you asked to be put in cc...

comment:2 Changed 10 years ago by jhpalmieri

  • Cc jhpalmieri added; palmieri removed

comment:3 Changed 10 years ago by hivert

  • Description modified (diff)

I have a patch proposal which require one patch for the developer guide and one for the file $SAGE_ROOT/local/bin/sage-test. I'm not sure how I am supposed to submit this second one. Should I just create a patch as usual against the hg repository inside $SAGE_ROOT/local/bin/sage-test ?

comment:4 Changed 10 years ago by hivert

  • Summary changed from Correct the developer guide testing ReST documentation section. to Markup ".. link" is wrong in the developer guide. Add ".. linkall" to systematically link.

comment:5 Changed 10 years ago by hivert

  • Description modified (diff)
  • Status changed from new to needs_review

comment:6 Changed 10 years ago by jhpalmieri

One correction: the line

will act as there where

should be

will act as if there were

The scripts patch works as advertised. Right now, ".. linkall" anywhere in the file will (as it says) link everything together. For example, the addition of the text ".. linkall" to that section of the developer's guide now means that everything there is linked together. This is not an issue for that particular file, but would it be better to search for \n.. linkall\n or do a regular expression search for ^\s*\.\.\s+linkall\s*$ or something like that (i.e., beginning of line, optional white space, two dots, non-optional whitespace, "linkall", optional whitespace, end of line)?

comment:7 follow-up: Changed 10 years ago by jhpalmieri

In more detail, replacing

    link_all = '.. linkall' in F

by

    link_all = re.search(r'^\s*\.\.\s+linkall\s*$', F, re.M)

seems to work for me, and only catches ".. linkall" if it's on a line by itself, other than white space.

Changed 10 years ago by hivert

comment:8 in reply to: ↑ 7 Changed 10 years ago by hivert

  • Authors set to Florent Hivert
  • Reviewers set to John Palmieri

link_all = re.search(r'^\s*\.\.\s+linkall\s*$', F, re.M) seems to work for me, and only catches ".. linkall" if it's on a line by itself, other than white space.

Sorry for my bad English and thanks for taking care of writing the regexp. I just submitted two new patches which should address your remarks.

Thanks for the review.

Changed 10 years ago by jhpalmieri

apply on top of trac_11263-doctests_link_all-fh.patch

comment:9 follow-up: Changed 10 years ago by jhpalmieri

  • Description modified (diff)

Here's a patch which modifies the wording in the developer's guide, plus it adds an example of using ".. linkall" (to a file in the tutorial). Florent, I'm happy with your changes. If you're okay with mine, you can give the whole ticket a positive review.

comment:10 in reply to: ↑ 9 ; follow-up: Changed 10 years ago by hivert

  • Status changed from needs_review to positive_review

Replying to jhpalmieri:

Here's a patch which modifies the wording in the developer's guide, plus it adds an example of using ".. linkall" (to a file in the tutorial). Florent, I'm happy with your changes. If you're okay with mine, you can give the whole ticket a positive review.

Looks perfectly Ok ! Thanks for the help. Should I fold the two patches ?

comment:11 in reply to: ↑ 10 Changed 10 years ago by jhpalmieri

Replying to hivert:

Looks perfectly Ok ! Thanks for the help. Should I fold the two patches ?

Sure, that might make it easier for the release manager. Thanks.

comment:12 Changed 10 years ago by hivert

  • Description modified (diff)

I just uploaded the folded patch.

comment:13 Changed 10 years ago by jdemeyer

  • Merged in set to sage-4.7.1.alpha1
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.