Fix repo (#55)
* Fix option is an empty string * Fix test * Add hr style #54 * Tweak hr style
This commit is contained in:
parent
000a1fcdf0
commit
69e500bd33
4 changed files with 14 additions and 3 deletions
|
|
@ -25,7 +25,7 @@ const script = document.currentScript || [].slice.call(document.getElementsByTag
|
|||
if (script) {
|
||||
for (const prop in OPTIONS) {
|
||||
const val = script.getAttribute('data-' + camel2kebab(prop))
|
||||
OPTIONS[prop] = isNil(val) ? OPTIONS[prop] : (val || true)
|
||||
OPTIONS[prop] = isNil(val) ? OPTIONS[prop] : (typeof OPTIONS[prop] === 'string' ? val : true)
|
||||
}
|
||||
if (OPTIONS.loadSidebar === true) OPTIONS.loadSidebar = '_sidebar.md'
|
||||
if (OPTIONS.loadNavbar === true) OPTIONS.loadNavbar = '_navbar.md'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue