Skip to content

Commit

Permalink
Fix indent style to tab.
Browse files Browse the repository at this point in the history
  • Loading branch information
pulipulichen committed Jan 4, 2025
1 parent dacd5ba commit 8cb7327
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions GitHub.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@ function completeWithBibTeX(item, bibtex) {
item.abstractNote = abstract[1];
}

let keywords = extractKeywords(cffText)
let keywords = extractKeywords(cffText);
if (keywords.length > 0) {
item.tags = item.tags.concat(keywords)
item.tags = item.tags.concat(keywords);
}

item.complete();
Expand All @@ -212,14 +212,14 @@ function completeWithBibTeX(item, bibtex) {

// Parse the YAML and extract keywords
function extractKeywords(cffText) {
// Use a regular expression to extract the `keywords` block
const match = cffText.match(/keywords:\s+((?:- .+\s*)+)/);
if (!match) return []; // Return an empty array if no keywords found

// Extract the lines under `keywords` and clean them up
const keywordsBlock = match[1];
return keywordsBlock
.split("\n") // Split into lines
// Use a regular expression to extract the `keywords` block
const match = cffText.match(/keywords:\s+((?:- .+\s*)+)/);
if (!match) return []; // Return an empty array if no keywords found

// Extract the lines under `keywords` and clean them up
const keywordsBlock = match[1];
return keywordsBlock
.split("\n") // Split into lines

Check failure on line 222 in GitHub.js

View workflow job for this annotation

GitHub Actions / Lint, Check, Test

Mixed spaces and tabs

Check failure on line 222 in GitHub.js

View workflow job for this annotation

GitHub Actions / Lint, Check, Test

Mixed spaces and tabs
.map(line => line.trim().replace(/^- /, "")) // Trim and remove `- `
.filter(line => line !== ""); // Remove empty lines
}
Expand Down

0 comments on commit 8cb7327

Please sign in to comment.