Skip to content

Commit 542be29

Browse files
committed
Use markdown for diff note
1 parent 7951970 commit 542be29

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

app/scripts/controllers/tools.js

+16-10
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ angular.module('oncokbApp')
154154
$scope.searchHistory = function(genesForHistory) {
155155
$scope.errorMessage = '';
156156
$scope.historySearchResults = [];
157-
if ((!$scope.dateRangeStartDateStr || !$scope.dateRange.dateRangeEndDateStr) &&
157+
if ((!$scope.dateRangeStartDateStr || !$scope.dateRangeEndDateStr) &&
158158
(!_.isArray($scope.genesForHistory) || $scope.genesForHistory.length === 0) &&
159159
$scope.selectedTypeCheckboxes.length === 0) {
160160
$scope.errorMessage = 'Please choose conditions from Gene, Date or Type.';
@@ -374,19 +374,25 @@ angular.module('oncokbApp')
374374

375375
var content = [];
376376
if (result.gene.length > 0) {
377-
content.push('Gene:');
378-
content = addRecordToFile(content, result.gene);
379-
content.push('');
377+
var segments = [];
378+
segments.push('### Gene\n```');
379+
segments = addRecordToFile(segments, result.gene);
380+
segments.push('```\n');
381+
content.push(segments.join('\n'));
380382
}
381383
if (result.alteration.length > 0) {
382-
content.push('Alteration:');
383-
content = addRecordToFile(content, result.alteration);
384-
content.push('');
384+
var segments = [];
385+
segments.push('### Alteration\n```');
386+
segments = addRecordToFile(segments, result.alteration);
387+
segments.push('```\n');
388+
content.push(segments.join('\n'));
385389
}
386390
if (result.evidence.length > 0) {
387-
content.push('Evidence:');
388-
content = addRecordToFile(content, result.evidence);
389-
content.push('');
391+
var segments = [];
392+
segments.push('### Evidence\n```');
393+
segments = addRecordToFile(segments, result.evidence);
394+
segments.push('```\n');
395+
content.push(segments.join('\n'));
390396
}
391397
var blob = new Blob([content.join('\n')], {
392398
type: 'text/plain;charset=utf-8;'

0 commit comments

Comments
 (0)