Skip to content

Commit

Permalink
Update demo page: add dataTypeCase and functionCase
Browse files Browse the repository at this point in the history
  • Loading branch information
nene committed Dec 7, 2023
1 parent 371c091 commit 81da14c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
16 changes: 16 additions & 0 deletions static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,22 @@ <h3 style="margin: 0.5rem 0">Options</h3>
<option value="lower">Lower</option>
</select>
</article>
<article class="config">
<label for="dataTypeCase">Data type case:</label>
<select id="dataTypeCase">
<option value="preserve">Preserve</option>
<option value="upper">Upper</option>
<option value="lower">Lower</option>
</select>
</article>
<article class="config">
<label for="functionCase">Function case:</label>
<select id="functionCase">
<option value="preserve">Preserve</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">
Expand Down
6 changes: 6 additions & 0 deletions static/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ const attachFormat = () => {
const tabWidth = document.getElementById('tabWidth');
const useTabs = document.getElementById('useTabs');
const keywordCase = document.getElementById('keywordCase');
const dataTypeCase = document.getElementById('dataTypeCase');
const functionCase = document.getElementById('functionCase');
const identifierCase = document.getElementById('identifierCase');
const indentStyle = document.getElementById('indentStyle');
const logicalOperatorNewline = document.getElementById('logicalOperatorNewline');
Expand Down Expand Up @@ -34,6 +36,8 @@ const attachFormat = () => {
tabWidth: tabWidth.value,
useTabs: useTabs.checked,
keywordCase: keywordCase.options[keywordCase.selectedIndex].value,
dataTypeCase: dataTypeCase.options[dataTypeCase.selectedIndex].value,
functionCase: functionCase.options[functionCase.selectedIndex].value,
identifierCase: identifierCase.options[identifierCase.selectedIndex].value,
indentStyle: indentStyle.options[indentStyle.selectedIndex].value,
logicalOperatorNewline:
Expand Down Expand Up @@ -70,6 +74,8 @@ const attachFormat = () => {
tabWidth,
useTabs,
keywordCase,
dataTypeCase,
functionCase,
identifierCase,
indentStyle,
logicalOperatorNewline,
Expand Down

0 comments on commit 81da14c

Please sign in to comment.