diff --git a/src/pages/index.js b/src/pages/index.js index 8f3374a..dd0b6fe 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -19,18 +19,22 @@ import learnAnimation from "./learn.json"; import styles from './index.module.css'; -const example = `pub resource NFT { - pub fun greet(): String { - return "I'm NFT #" - .concat(self.uuid.toString()) - } +const example = `access(all) +resource NFT { + + access(all) + fun greet(): String { + return "I'm NFT #" + .concat(self.uuid.toString()) + } } -pub fun main(): String { - let nft <- create NFT() - let greeting = nft.greet() - destroy nft - return greeting +access(all) +fun main(): String { + let nft <- create NFT() + let greeting = nft.greet() + destroy nft + return greeting }` function cadence(Prism) { @@ -40,7 +44,7 @@ function cadence(Prism) { greedy: true }, keyword: - /\b(?:pub|fun|resource|create|let|destroy|return|self)\b/, + /\b(?:access|all|fun|resource|create|let|destroy|return|self)\b/, 'class-name': /\b[A-Z][A-Za-z_\d]*\b/, function: /\b[a-z_]\w*(?=\s*\()/i, } @@ -58,7 +62,7 @@ function HomepageHeader() {
{siteConfig.tagline}