Skip to content

Commit 9d54a84

Browse files
committed
Updating documentation script
1 parent 25f06e9 commit 9d54a84

File tree

3 files changed

+34
-11
lines changed

3 files changed

+34
-11
lines changed

assets/js/ao-docs.html

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!DOCTYPE html>
2+
3+
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
4+
<head>
5+
<meta charset="utf-8" />
6+
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css" \>
7+
<link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/styles/vs2015.min.css" rel="stylesheet" \>
8+
<title></title>
9+
<script src="https://buildableexpressions.readthedocs.io/js/jquery-2.1.1.min.js"></script>
10+
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
11+
<script>hljs.initHighlightingOnLoad();</script>
12+
</head>
13+
<body>
14+
<pre>
15+
<code class="cs">// Map null-source collections to null for all source
16+
// and target types:
17+
Mapper.WhenMapping.MapNullCollectionsToNull();
18+
19+
// Map null collections to null only when mapping from
20+
// Order to OrderDto:
21+
Mapper.WhenMapping
22+
.From&lt;Order&gt;()
23+
.To&lt;OrderDto&gt;()
24+
.MapNullCollectionsToNull();
25+
</code>
26+
</pre>
27+
<script>window['dox-cls'] = 'Mapper'</script>
28+
<script src="ao-docs.js"></script>
29+
</body>
30+
</html>

assets/js/ao-docs.js

+3-10
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
$(function () {
2-
var i, l, terms = document.location.search.substring(1).split('&'), term = '';
3-
for (i = 0, l = terms.length; i < l; ++i) {
4-
term = terms[i].split('=');
5-
if (term[0] === 't') {
6-
term = term[1];
7-
break;
8-
}
9-
}
10-
var hlCode = document.querySelectorAll('pre code.language-cs'),
2+
var hlCode = document.querySelectorAll('pre code.language-cs,pre code.cs'),
113
hlLength = hlCode.length,
12-
termsRegex = new RegExp('\\b(' + term + ')\\b', 'g'),
4+
i, l,
5+
termsRegex = new RegExp('\\b(' + (window['dox-cls'] || 'xyz') + ')\\b', 'g'),
136
typeRegex = /(new<\/span>\W+|class<\/span> <span class="hljs-title">|public<\/span>\W+|: <span class="hljs-title">|&lt;)([A-Z][^& \(\[\]]+)( |{|\(|\[\]&gt;|&gt;)/g,
147
genericTypeRegex = /(I{0,1}Dictionary|IEnumerable|IReadOnlyCollection|I{0,1}Collection|I{0,1}List)&lt;/g,
158
observer = new MutationObserver(function (mutations) {

assets/js/ao-docs.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)