@microsoft/api-documenter
Advanced tools
Comparing version
@@ -5,2 +5,14 @@ { | ||
{ | ||
"version": "1.4.3", | ||
"tag": "@microsoft/api-documenter_v1.4.3", | ||
"date": "Thu, 12 Jul 2018 16:03:26 GMT", | ||
"comments": { | ||
"patch": [ | ||
{ | ||
"comment": "Changing Office's APIExtractor add-on to unescape characters in code blocks" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"version": "1.4.2", | ||
@@ -7,0 +19,0 @@ "tag": "@microsoft/api-documenter_v1.4.2", |
# Change Log - @microsoft/api-documenter | ||
This log was last generated on Tue, 03 Jul 2018 21:03:31 GMT and should not be manually modified. | ||
This log was last generated on Thu, 12 Jul 2018 16:03:26 GMT and should not be manually modified. | ||
## 1.4.3 | ||
Thu, 12 Jul 2018 16:03:26 GMT | ||
### Patches | ||
- Changing Office's APIExtractor add-on to unescape characters in code blocks | ||
## 1.4.2 | ||
@@ -6,0 +13,0 @@ Tue, 03 Jul 2018 21:03:31 GMT |
@@ -20,3 +20,3 @@ import { DocItemSet } from '../utils/DocItemSet'; | ||
private _fixCodeTicks(text); | ||
private _fixCodeArrows(text); | ||
private _fixEscapedCode(text); | ||
} |
@@ -48,18 +48,2 @@ "use strict"; | ||
const nameWithoutPackage = yamlItem.uid.replace(/^[^.]+\./, ''); | ||
const snippets = this._snippets[nameWithoutPackage]; | ||
if (snippets) { | ||
delete this._snippets[nameWithoutPackage]; | ||
if (!yamlItem.remarks) { | ||
yamlItem.remarks = ''; | ||
} | ||
yamlItem.remarks += '\n\n#### Examples\n'; | ||
for (const snippet of snippets) { | ||
if (snippet.search(/await/) === -1) { | ||
yamlItem.remarks += '\n```javascript\n' + snippet + '\n```\n'; | ||
} | ||
else { | ||
yamlItem.remarks += '\n```typescript\n' + snippet + '\n```\n'; | ||
} | ||
} | ||
} | ||
if (yamlItem.summary) { | ||
@@ -74,3 +58,3 @@ yamlItem.summary = this._fixupApiSet(yamlItem.summary, yamlItem.uid); | ||
yamlItem.remarks = this._fixCodeTicks(yamlItem.remarks); | ||
yamlItem.remarks = this._fixCodeArrows(yamlItem.remarks); | ||
yamlItem.remarks = this._fixEscapedCode(yamlItem.remarks); | ||
} | ||
@@ -85,2 +69,18 @@ if (yamlItem.syntax && yamlItem.syntax.parameters) { | ||
} | ||
const snippets = this._snippets[nameWithoutPackage]; | ||
if (snippets) { | ||
delete this._snippets[nameWithoutPackage]; | ||
if (!yamlItem.remarks) { | ||
yamlItem.remarks = ''; | ||
} | ||
yamlItem.remarks += '\n\n#### Examples\n'; | ||
for (const snippet of snippets) { | ||
if (snippet.search(/await/) === -1) { | ||
yamlItem.remarks += '\n```javascript\n' + snippet + '\n```\n'; | ||
} | ||
else { | ||
yamlItem.remarks += '\n```typescript\n' + snippet + '\n```\n'; | ||
} | ||
} | ||
} | ||
} | ||
@@ -112,4 +112,13 @@ _fixupApiSet(markup, uid) { | ||
} | ||
_fixCodeArrows(text) { | ||
return node_core_library_1.Text.replaceAll(text, '=>', '=>'); | ||
_fixEscapedCode(text) { | ||
const backtickIndex = text.indexOf('`'); | ||
if (text.indexOf('`', backtickIndex) > 0) { | ||
text = node_core_library_1.Text.replaceAll(text, '=>', '=>'); | ||
let x = text.indexOf('\\', backtickIndex); | ||
while (x >= 0) { | ||
text = text.replace(/\\([^\\])/, '$1'); | ||
x = text.indexOf('\\', x + 1); | ||
} | ||
} | ||
return text; | ||
} | ||
@@ -116,0 +125,0 @@ } |
{ | ||
"name": "@microsoft/api-documenter", | ||
"version": "1.4.2", | ||
"version": "1.4.3", | ||
"description": "Read JSON files from api-extractor, generate documentation pages", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
295814
0.53%3843
0.55%