mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
fix wrapping api links into code element
This commit is contained in:
parent
e89ef35d05
commit
af710c3ac1
3 changed files with 6 additions and 7 deletions
|
|
@ -59,11 +59,11 @@ $route.onChange(function() {
|
|||
Things to notice in this example:
|
||||
|
||||
|
||||
* The `batchLog` service depends on the built-in `{@link api/angular.service.$defer $defer}` and
|
||||
`{@link api/angular.service.$log $log}` services, and allows messages to be logged into the
|
||||
* The `batchLog` service depends on the built-in {@link api/angular.service.$defer $defer} and
|
||||
{@link api/angular.service.$log $log} services, and allows messages to be logged into the
|
||||
`console.log` in batches.
|
||||
* The `routeTemplateMonitor` service depends on the built-in `{@link api/angular.service.$route
|
||||
$route}` service as well as our custom `batchLog` service.
|
||||
* The `routeTemplateMonitor` service depends on the built-in {@link api/angular.service.$route
|
||||
$route} service as well as our custom `batchLog` service.
|
||||
* The `routeTemplateMonitor` service is declared to be eager, so that it is started as soon as the
|
||||
application starts.
|
||||
* To underline the need for the eager instantiation of the `routeTemplateMonitor` service, nothing
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
|
||||
To register a service, register a factory function that creates the service with angular's
|
||||
Injector. The Injector is exposed as `{@link api/angular.scope.$service scope.$service}`. The
|
||||
Injector. The Injector is exposed as {@link api/angular.scope.$service scope.$service}. The
|
||||
following pseudo-code shows a simple service registration:
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ Doc.prototype = {
|
|||
|
||||
var self = this,
|
||||
IS_URL = /^(https?:\/\/|ftps?:\/\/|mailto:|\.|\/)/,
|
||||
IS_ANGULAR = /^angular\./,
|
||||
IS_ANGULAR = /^(api\/)?angular\./,
|
||||
parts = trim(text).split(/(<pre>[\s\S]*?<\/pre>|<doc:(\S*).*?>[\s\S]*?<\/doc:\2>)/);
|
||||
|
||||
parts.forEach(function(text, i) {
|
||||
|
|
@ -125,7 +125,6 @@ Doc.prototype = {
|
|||
text = text.replace(/{@link\s+([^\s}]+)\s*([^}]*?)\s*}/g,
|
||||
function(_all, url, title){
|
||||
var isFullUrl = url.match(IS_URL),
|
||||
// FIXME(vojta) angular link could be api/angular now with sections
|
||||
isAngular = url.match(IS_ANGULAR),
|
||||
absUrl = isFullUrl ? url : self.convertUrlToAbsolute(url);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue