Skip to content

Commit

Permalink
Expose keywordCase option in demo page
Browse files Browse the repository at this point in the history
  • Loading branch information
nene committed Nov 21, 2023
1 parent 700a89c commit 78c28b7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
14 changes: 11 additions & 3 deletions static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,19 @@ <h3 style="margin: 0.5rem 0">Options</h3>
</select>
</article>
<article class="config">
<label for="keywordCase">Case:</label>
<label for="keywordCase">Keyword case:</label>
<select id="keywordCase">
<option value="preserve">Preserve</option>
<option value="upper">Uppercase</option>
<option value="lower">Lowercase</option>
<option value="upper">Upper</option>
<option value="lower">Lower</option>
</select>
</article>
<article class="config">
<label for="identifierCase">Identifier case:</label>
<select id="identifierCase">
<option value="preserve">Preserve</option>
<option value="upper">Upper</option>
<option value="lower">Lower</option>
</select>
</article>
<article class="config">
Expand Down
3 changes: 3 additions & 0 deletions static/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const attachFormat = () => {
const tabWidth = document.getElementById('tabWidth');
const useTabs = document.getElementById('useTabs');
const keywordCase = document.getElementById('keywordCase');
const identifierCase = document.getElementById('identifierCase');
const indentStyle = document.getElementById('indentStyle');
const logicalOperatorNewline = document.getElementById('logicalOperatorNewline');
const expressionWidth = document.getElementById('expressionWidth');
Expand All @@ -33,6 +34,7 @@ const attachFormat = () => {
tabWidth: tabWidth.value,
useTabs: useTabs.checked,
keywordCase: keywordCase.options[keywordCase.selectedIndex].value,
identifierCase: identifierCase.options[identifierCase.selectedIndex].value,
indentStyle: indentStyle.options[indentStyle.selectedIndex].value,
logicalOperatorNewline:
logicalOperatorNewline.options[logicalOperatorNewline.selectedIndex].value,
Expand Down Expand Up @@ -68,6 +70,7 @@ const attachFormat = () => {
tabWidth,
useTabs,
keywordCase,
identifierCase,
indentStyle,
logicalOperatorNewline,
expressionWidth,
Expand Down

0 comments on commit 78c28b7

Please sign in to comment.