Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
2ee297b0
Unverified
Commit
2ee297b0
authored
Jun 21, 2019
by
Dan Field
Committed by
GitHub
Jun 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix source-links (#34831)
parent
6dbd3f69
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
dartdoc.dart
dev/tools/dartdoc.dart
+11
-5
No files found.
dev/tools/dartdoc.dart
View file @
2ee297b0
...
...
@@ -133,7 +133,7 @@ Future<void> main(List<String> arguments) async {
}
dartdocBaseArgs
.
addAll
(<
String
>[
'--link-to-source-excludes'
,
'../../bin/cache'
,
'--link-to-source-root'
,
'../..'
,
'--link-to-source-uri-template'
,
'https://github.com/flutter/flutter/blob/
${gitRevision()}
/%f%#L%l%'
]);
'--link-to-source-uri-template'
,
'https://github.com/flutter/flutter/blob/
master
/%f%#L%l%'
]);
// Generate the documentation.
// We don't need to exclude flutter_tools in this list because it's not in the
// recursive dependencies of the package defined at dev/docs/pubspec.yaml
...
...
@@ -276,10 +276,16 @@ void createFooter(String footerPath, String version) {
File
(
'
${footerPath}
footer.html'
).
writeAsStringSync
(
'<script src="footer.js"></script>'
);
File
(
'
$kPublishRoot
/api/footer.js'
)
..
createSync
(
recursive:
true
)
..
writeAsStringSync
(
'''var span = document.querySelector('
footer
>
span
');
if (span) {
span.innerText = '
Flutter
$version
•
$timestamp
•
$
{
gitRevision
()}
$gitBranchOut
';
}
..
writeAsStringSync
(
'''(function() {
var span = document.querySelector('
footer
>
span
');
if (span) {
span.innerText = '
Flutter
$version
•
$timestamp
•
$
{
gitRevision
()}
$gitBranchOut
';
}
var sourceLink = document.querySelector('
a
.
source
-
link
');
if (sourceLink) {
sourceLink.href = sourceLink.href.replace('
/
master
/
', '
/
$
{
gitRevision
()}/
');
}
})();
'''
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment