facebook / facebook/folly

Lambda capture list [&]() appears as a link in markdown README files

Open
#1,744 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
30.5k
Forks
5.9k
PR merge metrics
No merged PRs in 30d

Description

For example, see https://github.com/facebook/folly/blob/main/folly/fibers/README.md#basic-example

The code block has a lambda in it, which should appear like this:

```c++
fiberManager.addTask([&]() {
```

However, because of how the README is rendering code blocks with HTML, that gets rendered as a link instead:


fiberManager.addTask([&]() {

---

The markdown to produce the above error is:

```


fiberManager.addTask([&]() {

```

However, removing that extra empty line for some reason fixes the problem:

```

fiberManager.addTask([&]() {


```

fiberManager.addTask([&]() {

This may be GitHub's fault, not certain.

Contributor guide

Open the contributing guide

Research direction

Reproduce the rendering from folly/fibers/README.md#basic-example using the HTML and markdown examples in the issue, including the extra empty line. Trace how that code block is rendered and determine whether the behavior belongs to Folly or GitHub; done means the C++ lambda appears as code rather than a link without relying on the line-break workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
html, markdown
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.