mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-11 03:16:48 +03:00
fix: parse json theme string for standalone tag (#1492)
This commit is contained in:
parent
22cc5f17dc
commit
d7a0a4da17
|
@ -32,7 +32,8 @@ function parseOptionsFromElement(element: Element) {
|
||||||
const res = {};
|
const res = {};
|
||||||
for (const attrName in attrMap) {
|
for (const attrName in attrMap) {
|
||||||
const optionName = attrName.replace(/-(.)/g, (_, $1) => $1.toUpperCase());
|
const optionName = attrName.replace(/-(.)/g, (_, $1) => $1.toUpperCase());
|
||||||
res[optionName] = attrMap[attrName];
|
const optionValue = attrMap[attrName];
|
||||||
|
res[optionName] = attrName === 'theme' ? JSON.parse(optionValue) : optionValue;
|
||||||
// TODO: normalize options
|
// TODO: normalize options
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user