aboutcode-org / aboutcode-org/source-inspector

xgettext: process files with spaces and colons in the filename

オープン
#18 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
C
スター
3
フォーク
2
PR マージ指標
30日以内にマージされた PR はありません

説明

From #16 (comments)

So what about file names that have a space in it, or perhaps have a semicolon? Those are valid file names and `xgettext` will happily process them and you will get something like this (I just renamed a file and then ran `xgettext`):

```
#: fdisk:big.c:234 fdisk:big.c:2942
```

I am not sure how common file names with semicolons are, but file names with spaces are not uncommon.

As far as I can tell `partition()` will not properly process this:

```
>>> _, _, bla = a.partition('#:')
>>> bla.partition(':')
(' fdisk', ':', 'big.c:234 fdisk:big.c:2942')
```

The only certainty that you have is that the part after the last : should be a number, so perhaps rewriting it to rpartition() would be the cleanest way.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

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

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