fix: allow user not to write .md or .markdown when creating file based on archetype #288
Former-commit-id: e2bc376cc78905e9d85596bcb281b1f52647b4fb [formerly d4c44f8625bda57d5659366d2651d8021776c9d2] [formerly 766fc98ad54327498076992a110415750d059bd2 [formerly 390fe1d797
]]
Former-commit-id: 6c30496fab170a7a39eacba39827e054089f64ad [formerly 8b3aac4b83339ec9722ddadc3fe225e3753afd94]
Former-commit-id: 85e39aa259af1e628e77d488fbd9c7ea5d207eb7
pull/726/head
parent
1d4a3005ff
commit
74f690a71b
|
@ -8,3 +8,5 @@ yarn-debug.log*
|
|||
yarn-error.log*
|
||||
.idea
|
||||
.vscode
|
||||
package-lock.json
|
||||
yarn.lock
|
|
@ -48,6 +48,10 @@ export default {
|
|||
new (url, type) {
|
||||
url = removePrefix(url)
|
||||
|
||||
if (!url.endsWith('.md') && !url.endsWith('.markdown')) {
|
||||
url += '.markdown'
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
let request = new window.XMLHttpRequest()
|
||||
request.open('POST', `${this.$store.state.baseURL}/api/resource${url}`, true)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1 +1 @@
|
|||
c6f470b346d636fddb53d5272ac4b421592270ff
|
||||
8dc18278add93dd1fc7dfed92798435b8f3d2c38
|
Loading…
Reference in New Issue