imdone-core 1.36.1 → 1.37.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/card.js +1 -0
- package/lib/file.js +1 -0
- package/lib/migrate-config.js +5 -0
- package/lib/project-factory.js +8 -0
- package/package.json +1 -1
package/lib/card.js
CHANGED
|
@@ -279,6 +279,7 @@ module.exports = function newCard(task, _project, dontParse) {
|
|
|
279
279
|
return content.replace(
|
|
280
280
|
/(!\[.*?\]\()(.*?)(\))/g,
|
|
281
281
|
(match, p1, imagePath, p3) => {
|
|
282
|
+
if (/^http/.test(imagePath)) return match
|
|
282
283
|
imagePath = _path.join(
|
|
283
284
|
_path.dirname(this.fullPath),
|
|
284
285
|
imagePath
|
package/lib/file.js
CHANGED
|
@@ -698,6 +698,7 @@ File.prototype.modifyTask = function (task, config, noEmit) {
|
|
|
698
698
|
if (this.getContent().trim() === newContent.trim()) return
|
|
699
699
|
this.setContent(newContent)
|
|
700
700
|
this.setModified(true)
|
|
701
|
+
task.lastLine = task.line + description.length
|
|
701
702
|
if (!noEmit) {
|
|
702
703
|
this.emit('task.modified', task)
|
|
703
704
|
this.emit('file.modified', this)
|
package/lib/migrate-config.js
CHANGED
|
@@ -55,6 +55,11 @@ module.exports = function (repo, defaultSettings = defaultSettingsObject) {
|
|
|
55
55
|
config.settings.cards.defaultList = lists ? lists[0] : ''
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
// showTagsAndMeta
|
|
59
|
+
if (config.settings.cards.showTagsAndMeta === undefined) {
|
|
60
|
+
config.settings.cards.showTagsAndMeta = true
|
|
61
|
+
}
|
|
62
|
+
|
|
58
63
|
if (!repo.listExists(config.settings.cards.defaultList) && lists) {
|
|
59
64
|
config.settings.cards.defaultList = lists[0]
|
|
60
65
|
}
|
package/lib/project-factory.js
CHANGED
|
@@ -5,8 +5,16 @@ const ProjectContext = require('./ProjectContext')
|
|
|
5
5
|
const Project = require('./project')
|
|
6
6
|
const context = require('./context/ApplicationContext')
|
|
7
7
|
|
|
8
|
+
function createWatchedFSProject({path, config, repo = watchedFsStore(new Repository(path, config))}) {
|
|
9
|
+
context().repo = repo
|
|
10
|
+
context().projectContext = new ProjectContext(repo)
|
|
11
|
+
context().project = new Project(repo)
|
|
12
|
+
return context().project
|
|
13
|
+
}
|
|
14
|
+
|
|
8
15
|
module.exports = {
|
|
9
16
|
createWatchedFileSystemProject: function(path) {
|
|
17
|
+
if (typeof path === 'object' && path.confg) return createWatchedFSProject(path)
|
|
10
18
|
const repo = watchedFsStore(new Repository(path))
|
|
11
19
|
context().repo = repo
|
|
12
20
|
context().projectContext = new ProjectContext(repo)
|