Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
breck7 committed Sep 25, 2024
1 parent 37d4f08 commit 2b97934
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scroll-cli",
"version": "133.5.0",
"version": "133.6.0",
"description": "A language for scientists of all ages. A curated collection of tools for refining and sharing thoughts.",
"main": "scroll.js",
"engines": {
Expand Down
30 changes: 30 additions & 0 deletions parsers/tables.parsers
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,36 @@ scrollComposeParser
return this.parent.columnNames.concat(this.newColumnName)
}

scrollLinksParser
extends abstractTableTransformParser
description Add column with links.
crux links
javascript
get coreTable() {
const {newColumnName, linkColumns} = this
return this.parent.coreTable.map(row => {
const newRow = Object.assign({}, row)
let newValue = []
linkColumns.forEach(name => {
const value = newRow[name]
delete newRow[name]
if (value) newValue.push(`<a href="${value.includes("@") ? "mailto:" : ""}${value}">${name}</a>`)
})
newRow[newColumnName] = newValue.join(" ")
return newRow
})
}
get newColumnName() {
return "links"
}
get linkColumns() {
return this.getAtomsFrom(1)
}
get columnNames() {
const {linkColumns} = this
return this.parent.columnNames.filter(name => !linkColumns.includes(name)).concat(this.newColumnName)
}

scrollLimitParser
extends abstractTableTransformParser
description Select a subset.
Expand Down
3 changes: 3 additions & 0 deletions releaseNotes.scroll
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ ciBadges.scroll
br
thinColumns

πŸ“¦ 133.6.0 9/24/2024
πŸŽ‰ added `links` parser to tables

πŸ“¦ 133.5.0 9/24/2024
πŸŽ‰ added `compose` parser to tables

Expand Down

0 comments on commit 2b97934

Please sign in to comment.