Skip to content

Commit

Permalink
fix: Trim settings whitespace
Browse files Browse the repository at this point in the history
See #4
  • Loading branch information
Mara-Li committed May 1, 2022
1 parent 1a39d6e commit 4738991
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions mkdocsPublisher/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class MkdocsSettingsTab extends PluginSettingTab {
.setPlaceholder('mkdocs-template')
.setValue(this.plugin.settings.githubRepo)
.onChange(async (value) => {
this.plugin.settings.githubRepo = value
this.plugin.settings.githubRepo = value.trim()
await this.plugin.saveSettings()
})
)
Expand All @@ -59,7 +59,7 @@ export class MkdocsSettingsTab extends PluginSettingTab {
.setPlaceholder('Github-username')
.setValue(this.plugin.settings.githubName)
.onChange(async (value) => {
this.plugin.settings.githubName = value
this.plugin.settings.githubName = value.trim()
await this.plugin.saveSettings()
})
)
Expand All @@ -79,7 +79,7 @@ export class MkdocsSettingsTab extends PluginSettingTab {
.setPlaceholder('ghb-15457498545647987987112184')
.setValue(this.plugin.settings.GhToken)
.onChange(async (value) => {
this.plugin.settings.GhToken = value
this.plugin.settings.GhToken = value.trim()
await this.plugin.saveSettings()
})
)
Expand All @@ -92,7 +92,7 @@ export class MkdocsSettingsTab extends PluginSettingTab {
.setPlaceholder('share')
.setValue(this.plugin.settings.shareKey)
.onChange(async (value) => {
this.plugin.settings.shareKey = value
this.plugin.settings.shareKey = value.trim()
await this.plugin.saveSettings()
})
)
Expand Down Expand Up @@ -141,7 +141,7 @@ export class MkdocsSettingsTab extends PluginSettingTab {
.setPlaceholder('category')
.setValue(this.plugin.settings.categoryKey)
.onChange(async (value) => {
this.plugin.settings.categoryKey = value
this.plugin.settings.categoryKey = value.trim()
await this.plugin.saveSettings()
})
)
Expand All @@ -154,7 +154,7 @@ export class MkdocsSettingsTab extends PluginSettingTab {
.setPlaceholder('Notes')
.setValue(this.plugin.settings.categoryDefault)
.onChange(async (value) => {
this.plugin.settings.categoryDefault = value
this.plugin.settings.categoryDefault = value.trim()
await this.plugin.saveSettings()
})
)
Expand All @@ -177,7 +177,7 @@ export class MkdocsSettingsTab extends PluginSettingTab {
.setPlaceholder('(i)')
.setValue(this.plugin.settings.indexFolder)
.onChange(async (value) => {
this.plugin.settings.indexFolder = value
this.plugin.settings.indexFolder = value.trim()
await this.plugin.saveSettings()
})
)
Expand Down

0 comments on commit 4738991

Please sign in to comment.