diff --git a/book/src/move-basics/README.md b/book/src/move-basics/README.md index 2602923..adfca5e 100644 --- a/book/src/move-basics/README.md +++ b/book/src/move-basics/README.md @@ -4,7 +4,6 @@ This chapter is all about the basic syntax of the Move language. It covers the b language, such as types, modules, functions, and control flow. It focuses on the language without a storage model or a blockchain, and explains the essential concepts of the language. To learn features specific to Sui, such as storage functions and abilities, refer to the -[Using Objects](../storage/README.md) chapter, however, it is recommended to start with this chapter -first. +[Using Objects](../storage/) chapter, however, it is recommended to start with this chapter first. diff --git a/theme/highlight.js b/theme/highlight.js index 2577943..0c23b73 100644 --- a/theme/highlight.js +++ b/theme/highlight.js @@ -422,7 +422,7 @@ hljs.registerLanguage('move', function(hljs) { let KEYWORDS = [ ...'public native friend entry macro'.split(' '), ...'let mut abort'.split(' '), - ...'if else while loop break continue'.split(' '), + ...'if else while loop break continue match'.split(' '), ]; return { @@ -497,8 +497,8 @@ hljs.registerLanguage('move', function(hljs) { { // struct definition scope: 'struct', - begin: 'struct', - keywords: 'struct', + begin: '\\b(struct|enum)\\b', + keywords: ['struct', 'enum'], end: /(?=[\)}])/, relevance: 10, contains: [ @@ -613,7 +613,7 @@ hljs.registerLanguage('move', function(hljs) { { // function call scope: 'title.function.invoke', - match: /\b[a-z_][a-z_0-9]*(?=\()/, + match: /\b[a-z_][a-z_0-9]*(\!?)(?=\()/, } ] };