Skip to content

Commit

Permalink
Fixing echidna errors (#246)
Browse files Browse the repository at this point in the history
* fix h2

* more

* fix header id

* update plugin

* update margin

* ...

* margin

* margin2

* back to h1

* update
  • Loading branch information
decentralgabe authored Feb 26, 2024
1 parent f766903 commit 9d5dd4d
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv='Content-Type' content='text/html;charset=utf-8'/>
<title>Securing Verifiable Credentials using JOSE and COSE</title>
<script src="https://www.w3.org/Tools/respec/respec-w3c" class="remove"></script>
<script src="https://cdn.jsdelivr.net/gh/w3c/vc-jose-cose@f2ecf4f7004dcd9524727a27f7671577c2e28cf4/plugin/dist/main.js"></script>
<script src="https://cdn.jsdelivr.net/gh/w3c/vc-jose-cose@89b1ff2cbafcb80b731aeb62fd5c1351a7ab595a/plugin/dist/main.js"></script>
<script class="remove">
// See https://github.com/w3c/respec/wiki/ for how to configure
// ReSpec
Expand Down
8 changes: 4 additions & 4 deletions plugin/dist/main.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions plugin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ function addVcJoseStyles() {
margin: 0 0;
}
.vc-jose-cose-tabbed h2, .vc-jose-cose-jwt-tabbed h2, .vc-jose-cose-sd-jwt-tabbed h2, .vc-jose-cose-cose-tabbed h2 {
.vc-jose-cose-tabbed h1, .vc-jose-cose-jwt-tabbed h1, .vc-jose-cose-sd-jwt-tabbed h1, .vc-jose-cose-cose-tabbed h1 {
font-size: 1em;
margin: 0 0;
}
.vc-jose-cose-tabbed [type="radio"], .vc-jose-cose-tabbed-jwt [type="radio"], .vc-jose-cose-tabbed-sd-jwt [type="radio"], .vc-jose-cose-tabbed-cose [type="radio"] {
Expand All @@ -71,7 +72,7 @@ function addVcJoseStyles() {
}
li.vc-jose-cose-tab, li.vc-jose-cose-jwt-tab, li.vc-jose-cose-sd-jwt-tab, li.vc-jose-cose-cose-tab {
margin: unset;
margin: 0 0;
margin-left: 8px;
}
Expand Down
6 changes: 3 additions & 3 deletions plugin/src/exampleCose.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ export const getCoseExample = async (privateKey, messageJson) => {
const messageHex = buf2hex(message)
const messageDiag = await cose.cbor.diagnose(message)
return `
<h2>${messageType.replace('+cose', '')}</h2>
<h1>${messageType.replace('+cose', '')}</h1>
<pre>
${JSON.stringify(messageJson, null, 2)}
</pre>
<h2>application/cbor-diagnostic</h2>
<h1>application/cbor-diagnostic</h2>
<div class="cose-text">
${messageDiag.trim()}
</div>
<h2>${messageType} (detached payload)</h2>
<h1>${messageType} (detached payload)</h1>
<div class="cose-text">
${messageHex}
</div>
Expand Down
6 changes: 3 additions & 3 deletions plugin/src/exampleJwt.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,16 @@ export const getJwtExample = async (privateKey, messageJson) => {
const messageEncoded = new TextDecoder().decode(message)
// const decodedHeader = jose.decodeProtectedHeader(messageEncoded)
// Not displaying protected header to save space
// <h2>Protected</h2>
// <h1>Protected</h1>
// <pre>
// ${JSON.stringify(decodedHeader, null, 2)}
// </pre>
return `
<h2>${messageType.replace('+jwt', '')}</h2>
<h1>${messageType.replace('+jwt', '')}</h1>
<pre>
${JSON.stringify(messageJson, null, 2)}
</pre>
<h2>${messageType}</h2>
<h1>${messageType}</h1>
<div class="jose-text">
${getJwtHtml(messageEncoded)}
</div>
Expand Down
6 changes: 3 additions & 3 deletions plugin/src/exampleSdJwt.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,18 @@ export const getSdJwtExample = async (privateKey, messageJson) => {

// const decodedHeader = jose.decodeProtectedHeader(messageEncoded.split('~')[0])
// Not displaying protected header to save space
// <h2>Protected</h2>
// <h1>Protected</h1>
// <pre>
// ${JSON.stringify(decodedHeader, null, 2)}
// </pre>
return `
<h2>${messageType2}</h2>
<h1>${messageType2}</h1>
<div>
${getDisclosabilityHtml(issuerClaims)}
</div>
<h2>${messageType}</h2>
<h1>${messageType}</h1>
<div class="jose-text">
${getSdHtml(messageEncoded)}
</div>
Expand Down

0 comments on commit 9d5dd4d

Please sign in to comment.