Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

fixed indentation of input.js comment #6660

Conversation

takashi
Copy link
Contributor

@takashi takashi commented Mar 12, 2014

Request Type: docs

How to reproduce:

Component(s): misc core

Impact: small

Complexity: small

This issue is related to:

Detailed Description:

the doc's code block of $formatter in http://docs.angularjs.org/api/ng/type/ngModel.NgModelController looks like

2014-03-12 21 17 53

So I fixed indentation of code block in input.js

Other Comments:

@mary-poppins
Copy link

Thanks for the PR! Please check the items below to help us merge this faster. See the contributing docs for more information.

  • Uses the issue template (#6660)

If you need to make changes to your pull request, you can update the commit with git commit --amend.
Then, update the pull request with git push -f.

Thanks again for your help!

@lefos987 lefos987 self-assigned this Mar 12, 2014
@lefos987 lefos987 added this to the Backlog milestone Mar 12, 2014
@lefos987 lefos987 removed their assignment Mar 12, 2014
@takashi takashi added cla: yes and removed cla: no labels Mar 18, 2014
* ngModel.$formatters.push(formatter);
* ```
* ```js
* function formatter(value) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code within the block needs to have one tab removed so that function lines up with the first back-tick.

@linclark
Copy link
Contributor

Thanks for catching this. I will commit this as soon as the extra tab is removed.

@caitp
Copy link
Contributor

caitp commented Apr 17, 2014

I'm not sure about this, I think this is probably more of a "dgeni should be less picky about where GFM snippets appear", because lining it up to show that it's a part of the function parameter docs is nice.

It will do that anyways in rendering, but it's not obvious looking at the code.

@petebacondarwin
Copy link
Contributor

@caitp - the trouble is that markdown treats indented text as a block of code. Dgeni is clever enough to strip off indentation based on the whitespace at the start of the jsdoc tag but it is not so easy to guess that indentation within a tag is supposed to be stripped.

@petebacondarwin
Copy link
Contributor

You'll notice that Dgeni does not strip off the indentation that has appeared in the other non-code text either:

<p>Array of functions to execute, as a pipeline, whenever
       the control reads value from the DOM.  Each function is called, in turn, passing the value
       through to the next. The last return value is used to populate the model.
       Used to sanitize / convert the value as well as validation. For validation,
       the parsers should update the validity state using</p>

@petebacondarwin
Copy link
Contributor

@linclark - thanks for triaging this. If there is a trivial change that's needed before merging then feel free to amend the commit and go ahead and merge.

@takashi
Copy link
Contributor Author

takashi commented May 21, 2014

@petebacondarwin thanks for commiting :)

@takashi takashi deleted the fix-documentation-of-ngModel.NgModelController branch May 21, 2014 18:21
RichardLitt pushed a commit to RichardLitt/angular.js that referenced this pull request May 24, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants