Opened 10 years ago

Closed 10 years ago

#13870 closed defect (fixed)

dijit._Widget#get - Underscore in docs get mangled by /api

Reported by: Andrew Muraco Owned by: bill
Priority: high Milestone: 1.7
Component: Documentation Version: 1.6.1
Keywords: api widget docs Cc:
Blocked By: Blocking:

Description (last modified by bill)

When looking at the docs for dijit._Widget#get, It doesn't match the docs in the file, and leads the programmer to use it wrong.

The following text is found in the file:

//		and "bar" and a method named "_getFooAttr", calling:
//	|	myWidget.get("foo");
//		would be equivalent to writing:
//	|	widget._getFooAttr();

On the /api website, the doc doesn't show the _ and instead italicizes the text, which leads to a different meaning. (this.getFooAttr() is wrong vs. this._getFooAttr())

The doc parse shouldn't parse the _ if it doesn't terminate on the same line.

Change History (6)

comment:1 Changed 10 years ago by Andrew Muraco

To be clear, compare the src/dijit/_WidgetBase.js comments for the get() method with the docs on the /api website.

Last edited 10 years ago by Andrew Muraco (previous) (diff)

comment:2 Changed 10 years ago by bill

Owner: set to Tom Trenka

Not sure what to do here, Tom is this something to fix on your end?

comment:3 Changed 10 years ago by Tom Trenka

Owner: changed from Tom Trenka to bill

Not entirely sure either; it may very well be that the markdown parser is seeing that set of underscores and trying to italicize things. My suggestion would be to try to not use italics in the inline docs, and instead maybe use the code indicators instead?

comment:4 Changed 10 years ago by bill

Description: modified (diff)

There's only one underscore, unless you are counting the underscores across multiple lines. Note that the inline docs are not trying to use italics. I'll try the backquotes.

comment:5 Changed 10 years ago by bill

Resolution: fixed
Status: newclosed

In [26533]:

fix api doc for get(), set(), and on(), fixes #13870 !strict

comment:6 Changed 10 years ago by bill

Milestone: tbd1.7
Note: See TracTickets for help on using tickets.