mirror of
https://github.com/OliveTin/OliveTin
synced 2025-12-14 18:15:37 +00:00
feature: Argument labels will end with a :, unless they end with ?, : or . already (#355)
This commit is contained in:
@@ -74,7 +74,15 @@ class ArgumentForm extends window.HTMLElement {
|
||||
|
||||
createDomLabel (arg) {
|
||||
const domLbl = document.createElement('label')
|
||||
domLbl.innerText = arg.title + ':'
|
||||
|
||||
const lastChar = arg.title.charAt(arg.title.length - 1)
|
||||
|
||||
if (lastChar === '?' || lastChar === '.' || lastChar === ':') {
|
||||
domLbl.innerHTML = arg.title
|
||||
} else {
|
||||
domLbl.innerHTML = arg.title + ':'
|
||||
}
|
||||
|
||||
domLbl.setAttribute('for', arg.name)
|
||||
|
||||
return domLbl
|
||||
|
||||
Reference in New Issue
Block a user