Skip to content

Commit

Permalink
removed old comment from locate DocumentTag
Browse files Browse the repository at this point in the history
  • Loading branch information
mahrud authored and d-torrance committed Sep 30, 2024
1 parent 2653cf5 commit db8c2a2
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions M2/Macaulay2/m2/document.m2
Original file line number Diff line number Diff line change
Expand Up @@ -416,13 +416,12 @@ isSecondaryTag = tag -> ( d := fetchRawDocumentation tag; d =!= null and d#?Pr
isUndocumented = tag -> ( d := fetchRawDocumentation tag; d =!= null and d#?"undocumented" and d#"undocumented" === true )
hasDocumentation = key -> null =!= fetchAnyRawDocumentation makeDocumentTag(key, Package => null)

-- TODO: is it possible to expand to (filename, start,startcol, stop,stopcol, pos,poscol)?
locate DocumentTag := tag -> new FilePosition from (
if (rawdoc := fetchAnyRawDocumentation tag) =!= null
then (
minimizeFilename((package rawdoc.DocumentTag)#"source directory" |
rawdoc#"filename"),
rawdoc#"linenum", 0)
rawdoc := fetchAnyRawDocumentation tag;
if rawdoc =!= null then (
pkg := package rawdoc.DocumentTag;
src := minimizeFilename(pkg#"source directory" | rawdoc#"filename");
src, rawdoc#"linenum", 0)
else (currentFileName, currentRowNumber(), currentColumnNumber()))

-----------------------------------------------------------------------------
Expand Down

0 comments on commit db8c2a2

Please sign in to comment.