Macaulay2 / Macaulay2/M2

comments in examples

Open
#1,894 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Documentation
Dominant language
Macaulay2
Stars
435
Forks
297
Avg merge
4d 20h
Merged PRs (30d)
11

Description

Comments are sometimes stripped from examples, and sometimes they aren't. The behavior is also different between generated exampled and canned examples.

Consider the simple package below:

newPackage("Foo", Headline => "foo")

export {"foo"}

foo = () -> print "foo"

beginDocumentation()

doc ///
 Key
   foo
 Description
   Text
     Regular example
   Example
     -- foo
     elapsedTime 2 + 2
  Text
    Canned example
  CannedExample
    i1 : -- foo
         elapsedTime 2 + 2
     -- 3.33e-6 seconds elapsed

    o1 = 4
///

This gives us:

i3 : help "foo"

o3 = foo
     ***

     Description
     ===========

     Regular example

     +--------------------------+
     |i1 : elapsedTime 2 + 2    |
     | -- 3.5e-7 seconds elapsed|
     |                          |
     |o1 = 4                    |
     +--------------------------+

     Canned example

     +----------------------+
     |i1 : -- foo           |
     |     elapsedTime 2 + 2|
     |                      |
     |o1 = 4                |
     +----------------------+

     For the programmer
     ==================

     The object "foo" is a function closure.

o3 : DIV

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue using the package and documentation example shown in the report, then inspect the paths that render generated and canned examples for help "foo". Compare how each path handles the -- foo comments. Done means comment behavior is consistent between both example types and the displayed output matches the intended documentation.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.