Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@example indent breaks in @constructor class block #323

Closed
SirKnightDragoon opened this issue Mar 6, 2015 · 9 comments · Fixed by #339
Closed

@example indent breaks in @constructor class block #323

SirKnightDragoon opened this issue Mar 6, 2015 · 9 comments · Fixed by #339
Assignees
Labels
Milestone

Comments

@SirKnightDragoon
Copy link

When I'm writing this:

untitled-1

The render is:

untitled-1

@okuryu
Copy link
Member

okuryu commented Mar 7, 2015

Please try either.

/**
 * This is my method 1.
 *
 * @method myMethod1
 * @example
 * ```
 * //Init your Drag App
 * var options = {debug:true, version:"1.0.0"};
 * var dragApp = new DRAG.Core(function($){
 *     //Core ready!
 * }, options);
 * ```
 */

/**
 * This is my method 2.
 *
 * @method myMethod2
 * @example
 *     //Init your Drag App
 *     var options = {debug:true, version:"1.0.0"};
 *     var dragApp = new DRAG.Core(function($){
 *         //Core ready!
 *     }, options);
 */

The results as follows.

2015-03-07 at 11 31

@okuryu okuryu closed this as completed Mar 7, 2015
@SirKnightDragoon
Copy link
Author

Ok I found the Bug, the @example work on the @method, but not in the @Class / @constructor block.

Retry this in @Class / @constructor block, you will get the bug.

@SirKnightDragoon
Copy link
Author

@okuryu Don't close this issue, it's not fixed.

@okuryu
Copy link
Member

okuryu commented Mar 10, 2015

@SirKnightDragoon Okay, I've verified your problem. I have never seen @example tags in @constructor class block, but fixing this makes sense to me!

@okuryu okuryu reopened this Mar 10, 2015
@okuryu okuryu added the bug label Mar 10, 2015
@okuryu okuryu changed the title @example indent bug @example indent breaks in @constructor class block Mar 10, 2015
@SirKnightDragoon
Copy link
Author

Thank ;)

@hhff
Copy link

hhff commented Mar 29, 2015

hi @okuryu! I'm reporting this one aswell. However, I'm just using example blocks inside a standard method:

  /**
    Persists an object to Local Storage.

    @method persist
    @param {Object} data A Javascript Object to persist to Local Storage.
    @return {Boolean} Will always resolve to `true`.

    ```javascript
    persist(data);
    console.log('Why are these blocks so far indented?');
    function() {
      return "I have no idea, im using the correct syntax?";
    }
    ```
  */

Results in:

screen shot 2015-03-29 at 5 02 11 pm

Is there a working version of YUIDoc I can revert to? I'm trying to ship these docs on a tight timeline...

Thankyou!

okuryu added a commit to okuryu/yuidoc that referenced this issue Apr 4, 2015
@okuryu okuryu added this to the v0.7.0 milestone Apr 7, 2015
@okuryu okuryu self-assigned this Apr 7, 2015
@okuryu
Copy link
Member

okuryu commented Apr 29, 2015

Published [email protected].

@BlueRaja
Copy link

I'm still seeing this issue with literally every theme I can find except the default theme. Is that due to YUIdoc? Or are these themes basing themselves on old versions of the main theme?

@dmvaldman
Copy link

Seconding @BlueRaja's observation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants