Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

C# / Dotnet lexer parsing generic (template) return types fails

オープン 初心者向け
#3,424 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
csharp, latex, python
領域
tooling

調査の方向性

Pygments の C# lexer から始め、メソッドの戻り値型に対する正規表現を調べます。issue には dotnet.py に対する提案パッチが含まれています。ジェネリックな戻り値型を含め、2 つの GenericResult の例のハイライトを比較し、両方の形式について lexer テストを追加または更新して、関連するテストスイートを実行します。両方のメソッド名が一貫してハイライトされれば完了です。

索引モデルが issue の本文から書いたものです。

説明

In C# , code may return a "un-typified" (don't know if this is a real word) type:
public GenericResult Connect(IPAddress ip)

Using Generics (the C# implementation of Templates), typified to 'bool' it may look like this:
public GenericResult<bool> Connect(IPAddress ip)

Using the Latex minted package to generate nice code listings, this lead to incorrect and inconsistent formatting:

\begin{minted}{csharp}
public GenericResult MeLiBu_ReceiveFrame(MeLiBu.IMeLiBuFrameHeader frameHeader, List<byte> rawBytesReceived = null);
\end{minted}

\begin{minted}{csharp}
public GenericResult<MeLiBu.IMeLiBuFrame> MeLiBu_ReceiveFrame(MeLiBu.IMeLiBuFrameHeader frameHeader, List<byte> rawBytesReceived = null);
\end{minted}

Before Patch:

Image

Changing the Regex in the Lexer fixes this, please see attached patch:

dotnet.py.patch .

After Patch (notice the now colored method name MeLiBu_ReceiveFrame):

Image




However, I'm not familar with your unit testing or was unable to find guidelines or similar on how you want a pull-request to be formatted, so please excuse posting this as issue.

主要言語
Python
スター
2.2k
フォーク
929
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pygments/pygments のほかの issue

pygments/pygments の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。