diff options
| author | Peter Bacon Darwin | 2014-02-07 20:40:35 +0000 | 
|---|---|---|
| committer | Peter Bacon Darwin | 2014-02-16 19:03:41 +0000 | 
| commit | 2f7c57233ad2d578952dbba5c63ae8d50c1b487a (patch) | |
| tree | c14f91ad8429dd4c0b93bbc89dbd37ac4382f1e2 | |
| parent | 1192ae44f1d7f944719520f235e9f2ec895bdfd5 (diff) | |
| download | angular.js-2f7c57233ad2d578952dbba5c63ae8d50c1b487a.tar.bz2 | |
docs(bike-shed-migration): let markdown deal with extenal links
It is problematic to use {@link} tags with external links because the
markdown parser converts them to links for us before we parse the @links.
This means that the following tag:
```
{@link http://www.google.com Google}
```
get converted to:
```
{@link <a href="http://www.google.com/"></a> Google}
```
Our {@link} parser then converts this to:
```
<a href="<a"><</a>href="http://www.google.com/"></a> Google}
```
which is clearly a mess.  The best solution is not to use {@link} tags
for external links and just use the standard markdown syntax:
```
[Google](http://www.google.com)
```
In the long run, we could look into configuring or modifying `marked` not
to convert these external links or we could provide a "pre-parser"
processor that dealt with such links before `marked` gets its hands on it.
| -rw-r--r-- | src/ng/anchorScroll.js | 2 | ||||
| -rw-r--r-- | src/ng/controller.js | 3 | ||||
| -rw-r--r-- | src/ng/directive/input.js | 2 | ||||
| -rw-r--r-- | src/ng/directive/ngIf.js | 2 | ||||
| -rw-r--r-- | src/ng/directive/ngInclude.js | 8 | ||||
| -rw-r--r-- | src/ng/directive/ngPluralize.js | 8 | ||||
| -rw-r--r-- | src/ng/directive/select.js | 2 | ||||
| -rw-r--r-- | src/ng/http.js | 27 | ||||
| -rw-r--r-- | src/ng/location.js | 4 | ||||
| -rw-r--r-- | src/ng/sce.js | 4 | ||||
| -rw-r--r-- | src/ngMock/angular-mocks.js | 4 | ||||
| -rw-r--r-- | src/ngResource/resource.js | 8 | 
12 files changed, 36 insertions, 38 deletions
| diff --git a/src/ng/anchorScroll.js b/src/ng/anchorScroll.js index 4cb9a275..f45f67f9 100644 --- a/src/ng/anchorScroll.js +++ b/src/ng/anchorScroll.js @@ -11,7 +11,7 @@   * @description   * When called, it checks current value of `$location.hash()` and scroll to related element,   * according to rules specified in - * {@link http://dev.w3.org/html5/spec/Overview.html#the-indicated-part-of-the-document Html5 spec}. + * [Html5 spec](http://dev.w3.org/html5/spec/Overview.html#the-indicated-part-of-the-document).   *   * It also watches the `$location.hash()` and scrolls whenever it changes to match any anchor.   * This can be disabled by calling `$anchorScrollProvider.disableAutoScrolling()`. diff --git a/src/ng/controller.js b/src/ng/controller.js index 1a610b9c..edf5deaf 100644 --- a/src/ng/controller.js +++ b/src/ng/controller.js @@ -55,8 +55,7 @@ function $ControllerProvider() {       * `$controller` service is responsible for instantiating controllers.       *       * It's just a simple call to {@link auto.$injector $injector}, but extracted into -     * a service, so that one can override this service with {@link https://gist.github.com/1649788 -     * BC version}. +     * a service, so that one can override this service with [BC version](https://gist.github.com/1649788).       */      return function(expression, locals) {        var instance, match, constructor, identifier; diff --git a/src/ng/directive/input.js b/src/ng/directive/input.js index 92c7d2c5..60cf6dfe 100644 --- a/src/ng/directive/input.js +++ b/src/ng/directive/input.js @@ -1209,7 +1209,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$   *   * For best practices on using `ngModel`, see:   * - *  - {@link https://github.com/angular/angular.js/wiki/Understanding-Scopes} + *  - [https://github.com/angular/angular.js/wiki/Understanding-Scopes]   *   * For basic examples, how to use `ngModel`, see:   * diff --git a/src/ng/directive/ngIf.js b/src/ng/directive/ngIf.js index 9adb7080..2aaaf2dd 100644 --- a/src/ng/directive/ngIf.js +++ b/src/ng/directive/ngIf.js @@ -19,7 +19,7 @@   * Note that when an element is removed using `ngIf` its scope is destroyed and a new scope   * is created when the element is restored.  The scope created within `ngIf` inherits from   * its parent scope using - * {@link https://github.com/angular/angular.js/wiki/The-Nuances-of-Scope-Prototypal-Inheritance prototypal inheritance}. + * [prototypal inheritance](https://github.com/angular/angular.js/wiki/The-Nuances-of-Scope-Prototypal-Inheritance).   * An important implication of this is if `ngModel` is used within `ngIf` to bind to   * a javascript primitive defined in the parent scope. In this case any modifications made to the   * variable within the child scope will override (hide) the value in the parent scope. diff --git a/src/ng/directive/ngInclude.js b/src/ng/directive/ngInclude.js index 47bf742f..0258c9c5 100644 --- a/src/ng/directive/ngInclude.js +++ b/src/ng/directive/ngInclude.js @@ -12,13 +12,13 @@   * application document. This is done by calling {@link ng.$sce#methods_getTrustedResourceUrl   * $sce.getTrustedResourceUrl} on it. To load templates from other domains or protocols   * you may either {@link ng.$sceDelegateProvider#methods_resourceUrlWhitelist whitelist them} or - * {@link ng.$sce#methods_trustAsResourceUrl wrap them} as trusted values. Refer to Angular's {@link + * [wrap them](ng.$sce#methods_trustAsResourceUrl) as trusted values. Refer to Angular's {@link   * ng.$sce Strict Contextual Escaping}.   *   * In addition, the browser's - * {@link https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest - * Same Origin Policy} and {@link http://www.w3.org/TR/cors/ Cross-Origin Resource Sharing - * (CORS)} policy may further restrict whether the template is successfully loaded. + * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest) + * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/) + * policy may further restrict whether the template is successfully loaded.   * For example, `ngInclude` won't work for cross-domain requests on all browsers and for `file://`   * access on some browsers.   * diff --git a/src/ng/directive/ngPluralize.js b/src/ng/directive/ngPluralize.js index a322b3b9..ea5f2779 100644 --- a/src/ng/directive/ngPluralize.js +++ b/src/ng/directive/ngPluralize.js @@ -11,13 +11,13 @@   * These rules are bundled with angular.js, but can be overridden   * (see {@link guide/i18n Angular i18n} dev guide). You configure ngPluralize directive   * by specifying the mappings between - * {@link http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html - * plural categories} and the strings to be displayed. + * [plural categories](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html) + * and the strings to be displayed.   *   * # Plural categories and explicit number rules   * There are two - * {@link http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html - * plural categories} in Angular's default en-US locale: "one" and "other". + * [plural categories](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html) + * in Angular's default en-US locale: "one" and "other".   *   * While a plural category may match many numbers (for example, in en-US locale, "other" can match   * any number that is not 1), an explicit number rule can only match one number. For example, the diff --git a/src/ng/directive/select.js b/src/ng/directive/select.js index faa9c7a7..cf0e4cae 100644 --- a/src/ng/directive/select.js +++ b/src/ng/directive/select.js @@ -21,7 +21,7 @@ var ngOptionsMinErr = minErr('ngOptions');   *   * <div class="alert alert-warning">   * **Note:** `ngModel` compares by reference, not value. This is important when binding to an - * array of objects. See an example {@link http://jsfiddle.net/qWzTb/ in this jsfiddle}. + * array of objects. See an example [in this jsfiddle](http://jsfiddle.net/qWzTb/).   * </div>   *   * Optionally, a single hard-coded `<option>` element, with the value set to an empty string, can diff --git a/src/ng/http.js b/src/ng/http.js index 011b33a8..b2dca1d4 100644 --- a/src/ng/http.js +++ b/src/ng/http.js @@ -183,8 +183,8 @@ function $HttpProvider() {       *       * @description       * The `$http` service is a core Angular service that facilitates communication with the remote -     * HTTP servers via the browser's {@link https://developer.mozilla.org/en/xmlhttprequest -     * XMLHttpRequest} object or via {@link http://en.wikipedia.org/wiki/JSONP JSONP}. +     * HTTP servers via the browser's [XMLHttpRequest](https://developer.mozilla.org/en/xmlhttprequest) +     * object or via [JSONP](http://en.wikipedia.org/wiki/JSONP).       *       * For unit testing applications that use `$http` service, see       * {@link ngMock.$httpBackend $httpBackend mock}. @@ -473,9 +473,8 @@ function $HttpProvider() {       *       * When designing web applications, consider security threats from:       * -     * - {@link http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx -     *   JSON vulnerability} -     * - {@link http://en.wikipedia.org/wiki/Cross-site_request_forgery XSRF} +     * - [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx) +     * - [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery)       *       * Both server and the client must cooperate in order to eliminate these threats. Angular comes       * pre-configured with strategies that address these issues, but for this to work backend server @@ -483,9 +482,9 @@ function $HttpProvider() {       *       * ## JSON Vulnerability Protection       * -     * A {@link http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx -     * JSON vulnerability} allows third party website to turn your JSON resource URL into -     * {@link http://en.wikipedia.org/wiki/JSONP JSONP} request under some conditions. To +     * A [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx) +     * allows third party website to turn your JSON resource URL into +     * [JSONP](http://en.wikipedia.org/wiki/JSONP) request under some conditions. To       * counter this your server can prefix all JSON requests with following string `")]}',\n"`.       * Angular will automatically strip the prefix before processing it as JSON.       * @@ -505,7 +504,7 @@ function $HttpProvider() {       *       * ## Cross Site Request Forgery (XSRF) Protection       * -     * {@link http://en.wikipedia.org/wiki/Cross-site_request_forgery XSRF} is a technique by which +     * [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery) is a technique by which       * an unauthorized site can gain your user's private data. Angular provides a mechanism       * to counter XSRF. When performing XHR requests, the $http service reads a token from a cookie       * (by default, `XSRF-TOKEN`) and sets it as an HTTP header (`X-XSRF-TOKEN`). Since only @@ -519,7 +518,7 @@ function $HttpProvider() {       * that only JavaScript running on your domain could have sent the request. The token must be       * unique for each user and must be verifiable by the server (to prevent the JavaScript from       * making up its own tokens). We recommend that the token is a digest of your site's -     * authentication cookie with a {@link https://en.wikipedia.org/wiki/Salt_(cryptography) salt} +     * authentication cookie with a [salt](https://en.wikipedia.org/wiki/Salt_(cryptography))       * for added security.       *       * The name of the headers can be specified using the xsrfHeaderName and xsrfCookieName @@ -556,10 +555,10 @@ function $HttpProvider() {       *    - **timeout** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise}       *      that should abort the request when resolved.       *    - **withCredentials** - `{boolean}` - whether to to set the `withCredentials` flag on the -     *      XHR object. See {@link https://developer.mozilla.org/en/http_access_control#section_5 -     *      requests with credentials} for more information. -     *    - **responseType** - `{string}` - see {@link -     *      https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType requestType}. +     *      XHR object. See [requests with credentials]https://developer.mozilla.org/en/http_access_control#section_5 +     *      for more information. +     *    - **responseType** - `{string}` - see  +     *      [requestType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType).       *       * @returns {HttpPromise} Returns a {@link ng.$q promise} object with the       *   standard `then` method and two http specific methods: `success` and `error`. The `then` diff --git a/src/ng/location.js b/src/ng/location.js index 99783fc5..3a53ee1b 100644 --- a/src/ng/location.js +++ b/src/ng/location.js @@ -295,7 +295,7 @@ LocationHashbangInHtml5Url.prototype =     * This method is getter only.     *     * Return full url representation with all segments encoded according to rules specified in -   * {@link http://www.ietf.org/rfc/rfc3986.txt RFC 3986}. +   * [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt).     *     * @return {string} full url     */ @@ -495,7 +495,7 @@ function locationGetterSetter(property, preprocess) {   *   * @description   * The $location service parses the URL in the browser address bar (based on the - * {@link https://developer.mozilla.org/en/window.location window.location}) and makes the URL + * [window.location](https://developer.mozilla.org/en/window.location)) and makes the URL   * available to your application. Changes to the URL in the address bar are reflected into   * $location service and changes to $location are reflected into the browser address bar.   * diff --git a/src/ng/sce.js b/src/ng/sce.js index 6bcd05cc..1c93160d 100644 --- a/src/ng/sce.js +++ b/src/ng/sce.js @@ -485,8 +485,8 @@ function $SceDelegateProvider() {   *   * *Please note*:   * The browser's - * {@link https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest - * Same Origin Policy} and {@link http://www.w3.org/TR/cors/ Cross-Origin Resource Sharing (CORS)} + * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest) + * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)   * policy apply in addition to this and may further restrict whether the template is successfully   * loaded.  This means that without the right CORS policy, loading templates from a different domain   * won't work on all browsers.  Also, loading templates from `file://` URL does not work on some diff --git a/src/ngMock/angular-mocks.js b/src/ngMock/angular-mocks.js index fe25254f..17c32452 100644 --- a/src/ngMock/angular-mocks.js +++ b/src/ngMock/angular-mocks.js @@ -869,8 +869,8 @@ angular.mock.dump = function(object) {   * development please see {@link ngMockE2E.$httpBackend e2e $httpBackend mock}.   *   * During unit testing, we want our unit tests to run quickly and have no external dependencies so - * we don’t want to send {@link https://developer.mozilla.org/en/xmlhttprequest XHR} or - * {@link http://en.wikipedia.org/wiki/JSONP JSONP} requests to a real server. All we really need is + * we don’t want to send [XHR](https://developer.mozilla.org/en/xmlhttprequest) or + * [JSONP](http://en.wikipedia.org/wiki/JSONP) requests to a real server. All we really need is   * to verify whether a certain request has been sent or not, or alternatively just let the   * application make requests, respond with pre-trained responses and assert that the end result is   * what we expect it to be. diff --git a/src/ngResource/resource.js b/src/ngResource/resource.js index 2ee9cbbc..d0bc6544 100644 --- a/src/ngResource/resource.js +++ b/src/ngResource/resource.js @@ -134,10 +134,10 @@ function shallowClearAndCopy(src, dst) {   *   - **`timeout`** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise} that   *     should abort the request when resolved.   *   - **`withCredentials`** - `{boolean}` - whether to set the `withCredentials` flag on the - *     XHR object. See {@link https://developer.mozilla.org/en/http_access_control#section_5 - *     requests with credentials} for more information. - *   - **`responseType`** - `{string}` - see {@link - *     https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType requestType}. + *     XHR object. See [requests with credentials](https://developer.mozilla.org/en/http_access_control#section_5) + *     for more information. + *   - **`responseType`** - `{string}` - see + *     [requestType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType).   *   - **`interceptor`** - `{Object=}` - The interceptor object has two optional methods -   *     `response` and `responseError`. Both `response` and `responseError` interceptors get called   *     with `http response` object. See {@link ng.$http $http interceptors}. | 
