Reviewable / Reviewable/Reviewable

Allow inserting text after code snippets

Open
#1,095 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
CSS
Stars
209
Forks
39
Avg merge
1d 22h
Merged PRs (30d)
4

Description

Code snippets and suggestions currently have to be the last item(s) in a comment, but it's often desirable to have a snippets interspersed with some text, such as in the following comment:

> ```py
> data = []
> for i in range(3):
> x = lst[i]
> data.append(f(x))
> ```
> Let's improve this by iterating over `lst` correctly:
> ```py
> data = []
> for x in lst:
> data.append(f(x))
> ```
> And we can improve it further by just using `map()`:
> ```py
> data = map(f, lst)
> ```
> Or more readable-y as a list comprehension:
> ```py
> data = [f(x) for x in lst]
> ```

Which flows a lot better than what's currently allowed:

> ```py
> data = []
> for i in range(3):
> x = lst[i]
> data.append(f(x))
> ```
> Let's improve this by iterating over `lst` correctly. And we can improve it further by just using `map()`. Or more readable-y as a list comprehension.
> ```py
> data = []
> for x in lst:
> data.append(f(x))
> ```
> ```py
> data = map(f, lst)
> ```
> ```py
> data = [f(x) for x in lst]
> ```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.