Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
lxRbckl committed Sep 12, 2024
1 parent d122739 commit b711979
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/managers/markdownManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default class markdownManager {

extractProperties(file: string): Properties {

var url: string = '';
var properties: Properties = {};
var currentSubject: string = '';
var extractedProperty: string = '';
Expand All @@ -43,12 +44,14 @@ export default class markdownManager {
extractedProperty = extractedProperty.replace(' ', '-');
currentSubject = extractedProperty;

url = `${octokitConfig.tree}/${extractedProperty}`;

properties[currentSubject] = {

'url' : url,
'ecosystem' : {},
'hyperlink' : line,
'name' : extractedProperty,
'url' : `${octokitConfig.tree}/${extractedProperty}`
'hyperlink' : `[${extractedProperty}](${url})`

};

Expand All @@ -59,11 +62,13 @@ export default class markdownManager {
extractedProperty = line.split(markdownConfig.propertyRegexes['topic'])[1];
extractedProperty = extractedProperty.replace(' ', '-');

url = `${octokitConfig.tree}/${currentSubject}/${extractedProperty}`;

properties[currentSubject]['ecosystem'][extractedProperty] = {

'hyperlink' : line,
'url' : url,
'name' : extractedProperty,
'url' : `${octokitConfig.tree}/${currentSubject}/${extractedProperty}`
'hyperlink' : `[${extractedProperty}](${url})`

};

Expand Down Expand Up @@ -112,8 +117,8 @@ export default class markdownManager {
// >

// (projects, breaker) <
'\n## Experience\n',
projects.join(' '),
(projects.length > 0) ? '## Experience\n' : undefined,
(projects.length > 0) ? projects.join(' ') : undefined,
resource ? markdownConfig.smallBreaker : markdownConfig.bigBreaker,

// >
Expand Down

0 comments on commit b711979

Please sign in to comment.