Opened 14 years ago

Closed 14 years ago

#989 closed defect (fixed)

[with patch] Stripping $ from documentation

Reported by: nbruin Owned by: tba
Priority: major Milestone: sage-2.8.12
Component: documentation Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

sage: edit?

presently yields

 ...
          sage: import sage.misc.edit_module as m
          sage: m.set_edit_template("vi -c {line} {file}")
 ...

whereas the last line should read

         sage: m.set_edit_template("vi -c ${line} ${file}")

i.e., $ gets stripped from EXAMPLE text where it should not.

Attachments (1)

683-989-ncalexan-1.patch (2.8 KB) - added by ncalexan 14 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 14 years ago by cwitty

$ signs are stripped from docstrings in sage/misc/sagedoc.py, as part of an effort to convert LaTeX math markup to plain text.

Perhaps the right fix is to notice doctests, and disable these modifications for that part of the docstring.

comment:2 Changed 14 years ago by was

  • Milestone changed from sage-2.9 to sage-2.8.12

Changed 14 years ago by ncalexan

comment:3 Changed 14 years ago by ncalexan

  • Summary changed from Stripping $ from documentation to [with patch] Stripping $ from documentation

Changelog for the patch:

683,989: add 'nodetex' directive to docstrings: doesn't strip (la)tex code from docstrings.

The first line of a docstring is parsed as a comma-separated list of directives (no whitespace in directives!). For example:

r"""nodetex,notyetimplemented
...
"""

If 'nodetex' is one of the directives, then no (la)tex code is stripped from the docstring. The model was the 'nodoctest' directive already found at the top of a file.

comment:4 Changed 14 years ago by mabshoff

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

applied to 2.8.12.rc0

Note: See TracTickets for help on using tickets.