diff options
| author | John Bampton <[email protected]> | 2021-06-19 08:31:01 +1000 |
|---|---|---|
| committer | John Bampton <[email protected]> | 2021-06-19 08:38:58 +1000 |
| commit | 625210f67c47f85a196aa7bc8998f40fbdd2c40d (patch) | |
| tree | ef6d0d18b8b0fbbfc2d834d6efd7a27d18ef5b31 | |
| parent | e1637e716a995c21d80b21a4f8103af3d8f5a837 (diff) | |
| download | mruby-625210f67c47f85a196aa7bc8998f40fbdd2c40d.tar.gz mruby-625210f67c47f85a196aa7bc8998f40fbdd2c40d.zip | |
Enable markdownlint rule MD046 code-block-style
Fix C Markdown code block style
| -rw-r--r-- | .github/linters/.markdown-lint.yml | 3 | ||||
| -rw-r--r-- | CONTRIBUTING.md | 14 | ||||
| -rw-r--r-- | doc/guides/mrbgems.md | 4 | ||||
| -rw-r--r-- | doc/guides/symbol.md | 2 |
4 files changed, 10 insertions, 13 deletions
diff --git a/.github/linters/.markdown-lint.yml b/.github/linters/.markdown-lint.yml index bc7b9146e..a6b8cbc4f 100644 --- a/.github/linters/.markdown-lint.yml +++ b/.github/linters/.markdown-lint.yml @@ -33,6 +33,3 @@ MD026: false # MD040 fenced-code-language - Fenced code blocks should have a language specified MD040: false - -# MD046 code-block-style - Code block style -MD046: false diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 39fd6504c..ab0ae11f5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -82,13 +82,13 @@ on-demand. #### Insert a break after the function return value: - ```C - int - main(void) - { - ... - } - ``` +```c +int +main(void) +{ + ... +} +``` ### Ruby code diff --git a/doc/guides/mrbgems.md b/doc/guides/mrbgems.md index 88c5aedba..e67a260d1 100644 --- a/doc/guides/mrbgems.md +++ b/doc/guides/mrbgems.md @@ -273,7 +273,7 @@ mrbgems expects that you have implemented a C method called by the name of your GEM. If you call your GEM `c_extension_example`, your initialisation method could look like this: -```C +```c void mrb_c_extension_example_gem_init(mrb_state* mrb) { struct RClass *class_cextension = mrb_define_module(mrb, "CExtension"); @@ -288,7 +288,7 @@ mrbgems expects that you have implemented a C method called by the name of your GEM. If you call your GEM `c_extension_example`, your finalizer method could look like this: -```C +```c void mrb_c_extension_example_gem_final(mrb_state* mrb) { free(someone); diff --git a/doc/guides/symbol.md b/doc/guides/symbol.md index e9e72a6d3..5ce8cdd4d 100644 --- a/doc/guides/symbol.md +++ b/doc/guides/symbol.md @@ -4,7 +4,7 @@ Symbols in `mruby` C source code is represented by `mrb_sym` which is alias of `uint32_t`. Lower 30 bits are used for symbols so that higher 2 bits can be used as flags, e.g. `struct mt_elem` in `class.c`. -```C +```c struct mt_elem { union mt_ptr ptr; size_t func_p:1; |
