Skip to content

Commit

Permalink
[rc] Merge master (#51)
Browse files Browse the repository at this point in the history
* Bump acorn from 6.4.0 to 6.4.1 (#40)

Bumps [acorn](https://github.com/acornjs/acorn) from 6.4.0 to 6.4.1.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](acornjs/acorn@6.4.0...6.4.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Assorted fixes; unit tests (#42)

* Updated changelog/package.json for 3.2.0 release (#43)

* Adding license (#47)

Added license to address blackbaud/skyux2-docs#894

* Fixed href generator for lowercase type names (#49)

* Updated changelog/package.json for 3.2.1 release (#50)

* Update builder

* Fix public api path

* Update packages

* Update code-block

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Denise Pena <Denise.Pena@blackbaud.me>
  • Loading branch information
3 people committed Apr 28, 2020
1 parent 5b9bdd9 commit 2f13929
Show file tree
Hide file tree
Showing 11 changed files with 1,649 additions and 1,320 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 3.2.1 (2020-04-27)

- Fixed the anchor link service to handle types wrapped within markdown links. [#49](https://github.com/blackbaud/skyux-docs-tools/pull/49)

# 4.0.0-rc.2 (2020-04-16)

- Added bug fixes and features from the `master` branch. [#44](https://github.com/blackbaud/skyux-docs-tools/pull/44)
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Blackbaud

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1 change: 0 additions & 1 deletion index.ts

This file was deleted.

2,839 changes: 1,563 additions & 1,276 deletions package-lock.json

Large diffs are not rendered by default.

74 changes: 36 additions & 38 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"name": "@skyux/docs-tools",
"version": "4.0.0-rc.2",
"description": "Library for skyux-lib-docs",
"main": "bundles/bundle.umd.js",
"module": "index.ts",
"scripts": {
"build": "skyux build-public-library && node ./scripts/prepare-package.js",
"build:ci": "npm run build",
Expand All @@ -21,74 +19,74 @@
"url": "https://github.com/blackbaud/skyux-docs-tools.git"
},
"peerDependencies": {
"@angular/common": "^9.1.2",
"@angular/core": "^9.1.2",
"@angular/forms": "^9.1.2",
"@angular/platform-browser": "^9.1.2",
"@blackbaud/skyux-lib-code-block": "^2.0.0-rc.1",
"@angular/common": "^9.1.3",
"@angular/core": "^9.1.3",
"@angular/forms": "^9.1.3",
"@angular/platform-browser": "^9.1.3",
"@blackbaud/skyux-lib-code-block": "^2.0.0-rc.3",
"@blackbaud/skyux-lib-clipboard": "^2.0.0-rc.0",
"@blackbaud/skyux-lib-media": "^2.0.0-rc.0",
"@blackbaud/skyux-lib-stache": "^4.0.0-rc.1",
"@blackbaud/skyux-lib-stache": "^4.0.0-rc.2",
"@skyux/forms": "^4.0.0-rc.0",
"@skyux/i18n": "^4.0.0-rc.1",
"@skyux/indicators": "^4.0.0-rc.2",
"@skyux/layout": "^4.0.0-rc.1",
"@skyux/lists": "^4.0.0-rc.0",
"@skyux/modals": "^4.0.0-rc.2",
"@skyux/popovers": "^4.0.0-rc.0",
"@skyux/i18n": "^4.0.0-rc.5",
"@skyux/indicators": "^4.0.0-rc.4",
"@skyux/layout": "^4.0.0-rc.3",
"@skyux/lists": "^4.0.0-rc.2",
"@skyux/modals": "^4.0.0-rc.3",
"@skyux/popovers": "^4.0.0-rc.2",
"@skyux/tabs": "^4.0.0-rc.0"
},
"dependencies": {
"@stackblitz/sdk": "1.3.0",
"marked": "0.8.2"
},
"devDependencies": {
"@angular/animations": "9.1.2",
"@angular/common": "9.1.2",
"@angular/compiler": "9.1.2",
"@angular/compiler-cli": "9.1.2",
"@angular/core": "9.1.2",
"@angular/forms": "9.1.2",
"@angular/platform-browser": "9.1.2",
"@angular/platform-browser-dynamic": "9.1.2",
"@angular/router": "9.1.2",
"@angular/animations": "9.1.3",
"@angular/common": "9.1.3",
"@angular/compiler": "9.1.3",
"@angular/compiler-cli": "9.1.3",
"@angular/core": "9.1.3",
"@angular/forms": "9.1.3",
"@angular/platform-browser": "9.1.3",
"@angular/platform-browser-dynamic": "9.1.3",
"@angular/router": "9.1.3",
"@blackbaud/auth-client": "2.24.0",
"@blackbaud/skyux-builder-plugin-code-block": "1.1.0",
"@blackbaud/skyux-lib-clipboard": "2.0.0-rc.0",
"@blackbaud/skyux-lib-code-block": "2.0.0-rc.1",
"@blackbaud/skyux-lib-code-block": "2.0.0-rc.3",
"@blackbaud/skyux-lib-media": "2.0.0-rc.0",
"@blackbaud/skyux-lib-stache": "4.0.0-rc.1",
"@skyux-sdk/builder": "4.0.0-rc.5",
"@skyux-sdk/builder-plugin-skyux": "1.3.1",
"@blackbaud/skyux-lib-stache": "4.0.0-rc.2",
"@skyux-sdk/builder": "4.0.0-rc.7",
"@skyux-sdk/builder-plugin-skyux": "1.3.3",
"@skyux-sdk/e2e": "4.0.0-rc.0",
"@skyux-sdk/testing": "4.0.0-rc.1",
"@skyux/animations": "4.0.0-rc.0",
"@skyux/assets": "4.0.0-rc.1",
"@skyux/avatar": "4.0.0-rc.0",
"@skyux/config": "4.0.0-rc.2",
"@skyux/config": "4.0.0-rc.3",
"@skyux/core": "4.0.0-rc.4",
"@skyux/errors": "4.0.0-rc.0",
"@skyux/forms": "4.0.0-rc.0",
"@skyux/http": "4.0.0-rc.3",
"@skyux/i18n": "4.0.0-rc.3",
"@skyux/indicators": "4.0.0-rc.3",
"@skyux/i18n": "4.0.0-rc.5",
"@skyux/indicators": "4.0.0-rc.4",
"@skyux/inline-form": "4.0.0-rc.0",
"@skyux/layout": "4.0.0-rc.1",
"@skyux/lists": "4.0.0-rc.1",
"@skyux/lookup": "4.0.0-rc.0",
"@skyux/modals": "4.0.0-rc.2",
"@skyux/layout": "4.0.0-rc.3",
"@skyux/lists": "4.0.0-rc.2",
"@skyux/lookup": "4.0.0-rc.2",
"@skyux/modals": "4.0.0-rc.3",
"@skyux/navbar": "4.0.0-rc.0",
"@skyux/omnibar-interop": "4.0.0-rc.0",
"@skyux/popovers": "4.0.0-rc.2",
"@skyux/router": "4.0.0-rc.0",
"@skyux/tabs": "4.0.0-rc.0",
"@skyux/theme": "4.0.0-rc.2",
"@skyux/theme": "4.0.0-rc.5",
"codelyzer": "5.2.2",
"node-sass-tilde-importer": "1.0.2",
"rxjs": "6.5.5",
"ts-node": "8.6.2",
"tslint": "5.20.1",
"typescript": "3.6.5",
"ts-node": "8.3.0",
"tslint": "6.1.2",
"typescript": "3.8.3",
"zone.js": "0.10.3"
}
}
6 changes: 5 additions & 1 deletion skyuxconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
],
"app": {
"styles": [
"@skyux/theme/css/sky.css",
"src/app/public/styles/docs-tools.scss"
]
},
Expand All @@ -23,5 +22,10 @@
"unit": {
"browserSet": "paranoid"
}
},
"host": {
"frameOptions": {
"none": true
}
}
}
2 changes: 1 addition & 1 deletion src/app/app-extras.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
import {
SkyDocsToolsModule,
SkyDocsToolsOptions
} from './public';
} from './public/public_api';

@NgModule({
exports: [
Expand Down
2 changes: 1 addition & 1 deletion src/app/docs/sample/sample.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
import {
SkyDocsDemoControlPanelChange,
SkyDocsDemoControlPanelRadioChoice
} from '../../public';
} from '../../public/public_api';

@Component({
selector: 'app-sample-docs',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import {
expect
} from '@skyux-sdk/testing';

import {
SkyDocsAnchorLinkService
} from './anchor-link.service';
Expand All @@ -13,6 +17,7 @@ describe('Anchor link service', function () {
beforeEach(() => {
mockTypeDefinitionsProvider = {
anchorIds: {
'foouser': 'variable-foouser', // Test lowercase type names.
'Foo': 'foo',
'Foo2': 'foo2',
'FooComponent': 'foo-component',
Expand Down Expand Up @@ -58,4 +63,11 @@ describe('Anchor link service', function () {
].join(' '));
});

it('should handle markdown', () => {
const service = new SkyDocsAnchorLinkService(mockTypeDefinitionsProvider);
const content = 'Accepts [foouser](https://foouser.com/).';
const result = service.applyTypeAnchorLinks(content);
expect(result).toEqual(content);
});

});
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
* - If the type name starts with a period '.', then it is a sub property of an enumeration, etc. and should not be processed as a link.
*/
function createRegex(keyword: string): RegExp {
return new RegExp(`(^|[^a-zA-Z0-9>.]+)(${keyword})([^a-zA-Z0-9<]+|$)`, 'g');
return new RegExp(`(^|[^a-zA-Z0-9>.[/]+)(${keyword})([^a-zA-Z0-9<]+|$)`, 'g');
}

@Injectable()
Expand All @@ -41,6 +41,9 @@ export class SkyDocsAnchorLinkService {
const regex = createRegex(typeName);

let matches: RegExpExecArray;
let counter = 0;
const max = 100;

do {
matches = regex.exec(content);
if (matches) {
Expand All @@ -51,7 +54,8 @@ export class SkyDocsAnchorLinkService {
);
regex.lastIndex = 0;
}
} while (matches !== null);
counter++;
} while (matches !== null && counter < max);
});

return content;
Expand Down
File renamed without changes.

0 comments on commit 2f13929

Please sign in to comment.