From 3b7b4439296d7ab1e5eb461d348ccd47a58e53ee Mon Sep 17 00:00:00 2001 From: Hritik Naik Date: Tue, 18 Aug 2026 01:07:57 +0530 Subject: [PATCH] Standardize fenced code block formatting and add missing language tags --- Rguide.md | 10 +++++----- docguide/style.md | 4 ++-- objcguide.md | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Rguide.md b/Rguide.md index de27371a0..01584d707 100644 --- a/Rguide.md +++ b/Rguide.md @@ -18,7 +18,7 @@ and why these differences exist. Google prefers identifying functions with `BigCamelCase` to clearly distinguish them from other objects. -``` +```r # Good DoNothing <- function() { return(invisible(NULL)) @@ -28,7 +28,7 @@ DoNothing <- function() { The names of private functions should begin with a dot. This helps communicate both the origin of the function and its intended use. -``` +```r # Good .DoNothingPrivately <- function() { return(invisible(NULL)) @@ -48,7 +48,7 @@ The possibilities for creating errors when using `attach()` are numerous. We do not support using right-hand assignment. -``` +```r # Bad iris %>% dplyr::summarize(max_petal = max(Petal.Width)) -> results @@ -64,7 +64,7 @@ lines). Do not rely on R's implicit return feature. It is better to be clear about your intent to `return()` an object. -``` +```r # Good AddValues <- function(x, y) { return(x + y) @@ -80,7 +80,7 @@ AddValues <- function(x, y) { Users should explicitly qualify namespaces for all external functions. -``` +```r # Good purrr::map() ``` diff --git a/docguide/style.md b/docguide/style.md index 34b98ad4a..ba0b1ea79 100644 --- a/docguide/style.md +++ b/docguide/style.md @@ -502,7 +502,7 @@ $ bazel run :target -- --flag --foo=longlonglonglonglongvalue \ If you need a code block within a list, make sure to indent it so as to not break the list: -```markdown +````markdown * Bullet. ```c++ @@ -510,7 +510,7 @@ break the list: ``` * Next bullet. -``` +```` You can also create a nested code block with 4 spaces. Simply indent 4 additional spaces from the list indentation: diff --git a/objcguide.md b/objcguide.md index 905f1367c..63159880b 100644 --- a/objcguide.md +++ b/objcguide.md @@ -1375,7 +1375,7 @@ Code should avoid redundant property access. Prefer to assign a property value to a local variable when the property value is not expected to change and needs to be used multiple times. -```objc +```objectivec // GOOD: UIView *view = self.view; @@ -1384,7 +1384,7 @@ UIScrollView *scrollView = self.scrollView; [scrollView.trailingAnchor constraintEqualToAnchor:view.trailingAnchor].active = YES; ``` -```objc +```objectivec // AVOID: [self.scrollView.loadingAnchor constraintEqualToAnchor:self.view.loadingAnchor].active = YES; @@ -1394,7 +1394,7 @@ UIScrollView *scrollView = self.scrollView; When repeatedly referencing chained property invocations, prefer to capture the repeated expression in a local variable: -```objc +```objectivec // AVOID: foo.bar.baz.field1 = 10; @@ -1402,7 +1402,7 @@ foo.bar.baz.field2 = @"Hello"; foo.bar.baz.field3 = 2.71828183; ``` -```objc +```objectivec // GOOD: Baz *baz = foo.bar.baz;