Skip to content

Commit

Permalink
Merge pull request #403 from imdone/1.46.0
Browse files Browse the repository at this point in the history
1.46.0 - archive plugin
  • Loading branch information
piascikj authored Oct 10, 2024
2 parents 375348b + 389ecd4 commit c7fe73d
Show file tree
Hide file tree
Showing 29 changed files with 193 additions and 1,728 deletions.
3 changes: 2 additions & 1 deletion backlog/devex/remove-unused-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

## Tasks

- [ ] remove story tasking
- [x] remove story tasking
- [ ] Remove line parsing

<!--
#important
#1.46.0
order:-10000000
-->
225 changes: 0 additions & 225 deletions cli.js

This file was deleted.

22 changes: 22 additions & 0 deletions lib/adapters/file-gateway.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ module.exports = {
return fs.readFileSync.apply({}, args)
},

appendFileSync(...args) {
console.warn('sync call')
return fs.appendFileSync.apply({}, args)
},

writeFileSync(...args) {
console.warn('sync call')
return fs.writeFileSync.apply({}, args)
Expand Down Expand Up @@ -78,12 +83,29 @@ module.exports = {
console.warn('sync call')
return fs.readdirSync(path, { withFileTypes: true })
},

sanitizeFileName(fileName, replaceSpacesWith) {
// Remove markdown emoji
fileName = fileName.replace(/:\w+:/g, '').trim()
fileName = sanitize(fileName)
if (replaceSpacesWith)
fileName = fileName.replace(/ /g, replaceSpacesWith)
return fileName
},

preparePathForWriting(path) {
let stat = this.statSync(path)
if (!stat) {
let { dir, ext } = _path.parse(path)
if (!ext) {
dir = path
}
this.mkdirpSync(dir)
stat = this.statSync(path)
}
return {
isFile: stat && stat.isFile(),
isDirectory: stat && stat.isDirectory()
}
}
}
2 changes: 2 additions & 0 deletions lib/card.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,9 @@ module.exports = function newCard(task, _project, dontParse) {
)
const formattedRawMarkdown = this.formatContent(rawMarkdown, true).content
const { html, truncHtml } = this.getHtml(content)
const title = this.format(this.text, true)
return {
title,
html,
truncHtml,
encodedText,
Expand Down
Loading

0 comments on commit c7fe73d

Please sign in to comment.