github / github/paste-markdown

Links are inserted when copy/pasting action build logs and code with embedded links

未關閉
#49 2 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
JavaScript
星號
234
分支
47
平均合併
1 天 12 小時
30 天內合併 PR
5

描述

I was just trying to copy text out of an actions workflow, specifically [these lines](https://github.com/xt0rted-test/setup-dotnet-test/blob/044a4edc45952284fc730aed213e32644d07cb34/.github/workflows/dotnet-sdks.yml#L26-L32). Since I'm using OctoLinker the action name is linkified and the text that gets pasted into an issue shows up as:

```yml
- name: Set up .NET
uses: https://github.com/actions/setup-dotnet/tree/v2.0.0v2.0.0
with:
dotnet-version: |
3.1.417
5.0.406
6.0.201
```

instead of

```yml
- name: Set up .NET
uses: actions/setup-dotnet@v2.0.0
with:
dotnet-version: |
3.1.417
5.0.406
6.0.201
```

Similarly I tried to copy text out of an [Actions build log](https://github.com/xt0rted-test/setup-dotnet-test/runs/5973292245?check_suite_focus=true#step:2:22) and that's also pasting incorrectly. OctoLinker doesn't run on these pages so the issue isn't related to that like the above one kind of is.

```
.NET SDKs installed:
3.1.120 [/usr/share/dotnet/sdk]
3.1.202 [/usr/share/dotnet/sdk]
3.1.[30](https://github.com/xt0rted-test/setup-dotnet-test/runs/5973292245?check_suite_focus=true#step:2:30)2 [/usr/share/dotnet/sdk]
3.1.417 [/usr/share/dotnet/sdk]
5.0.104 [/usr/share/dotnet/sdk]
5.0.212 [/usr/share/dotnet/sdk]
5.0.303 [/usr/share/dotnet/sdk]
5.0.406 [/usr/share/dotnet/sdk]
6.0.201 [/usr/share/dotnet/sdk]
```

In this example the 4th line should actually be:

```
3.1.302 [/usr/share/dotnet/sdk]
```

貢獻指南

開啟貢獻指南

研究方向

透過複製工作流程程式碼和一段 Actions build-log 來重現問題,然後追蹤負責轉換含連結文字的 JavaScript 貼上和剪貼簿處理進入點。完成的標準是,複製的程式碼和日誌文字不再獲得嵌入的 Markdown 連結或被修改的字元。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
javascript
領域
frontend
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
38/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。