글머리 기호를 지원하는 텍스트 포맷터

글머리 기호를 지원하는 텍스트 포맷터

Git 커밋에 사용할 포맷터를 찾고 있습니다. par내가 원하는 것을 거의 수행하지만 (중요한) 제한은 커밋 메시지에서 흔히 볼 수 있는 글머리 기호 목록의 형식을 올바르게 지정할 수 없다는 것입니다.

예를 들어:

% export PARINIT="rTbgqR B=.,?'_A_a_@ Q=_s>|"
% par << EOF                                                                                                                                            
heredoc> [JR-1234] This is a fix for the thing.

I am a developer that doesn't like linebreaks. I am a developer that doesn't like linebreaks. I am a developer that doesn't like linebreaks.

  - I am a developer that doesn't like linebreaks. I also like bullet lists. I like bullet lists a lot.
  - I like bullet lists. I like bullet lists a lot. I am also a developer that doesn't like linebreaks.

I am a developer that doesn't like linebreaks. I am a developer that doesn't like linebreaks. I am a developer that doesn't like linebreaks.
heredoc> EOF

결과는 다음과 같습니다.

[JR-1234] This is a fix for the thing.

I am a developer that doesn't like linebreaks. I am a developer that
doesn't like linebreaks. I am a developer that doesn't like linebreaks.

  - I am a developer that doesn't like linebreaks. I also like bullet
  - lists. I like bullet lists a lot.  I like bullet lists. I like
  - bullet lists a lot. I am also a developer that doesn't like
  - linebreaks.

I am a developer that doesn't like linebreaks. I am a developer that
doesn't like linebreaks. I am a developer that doesn't like linebreaks.

동시에 나는 다음과 같은 것을 원합니다.

[JR-1234] This is a fix for the thing.

I am a developer that doesn't like linebreaks. I am a developer that
doesn't like linebreaks. I am a developer that doesn't like linebreaks.

  - I am a developer that doesn't like linebreaks. I also like bullet
    lists. I like bullet lists a lot.
  - I like bullet lists. I like bullet lists a lot. I am also a
    developer that doesn't like linebreaks.

I am a developer that doesn't like linebreaks. I am a developer that
doesn't like linebreaks. I am a developer that doesn't like linebreaks.

이는 par이상적이지만 다른 동등한 독립 실행형 포맷터도 작동합니다.

답변1

Pandoc은 다음을 수행합니다.

$ pandoc -t plain <<EOF
>  [JR-1234] This is a fix for the thing.
> 
> I am a developer that doesn't like linebreaks. I am a developer that doesn't like linebreaks. I am a developer that doesn't like linebreaks.
> 
>   - I am a developer that doesn't like linebreaks. I also like bullet lists. I like bullet lists a lot.
>   - I like bullet lists. I like bullet lists a lot. I am also a developer that doesn't like linebreaks.
> 
> I am a developer that doesn't like linebreaks. I am a developer that doesn't like linebreaks. I am a developer that doesn't like linebreaks.
> EOF
[JR-1234] This is a fix for the thing.

I am a developer that doesn’t like linebreaks. I am a developer that
doesn’t like linebreaks. I am a developer that doesn’t like linebreaks.

-   I am a developer that doesn’t like linebreaks. I also like bullet
    lists. I like bullet lists a lot.
-   I like bullet lists. I like bullet lists a lot. I am also a
    developer that doesn’t like linebreaks.

I am a developer that doesn’t like linebreaks. I am a developer that
doesn’t like linebreaks. I am a developer that doesn’t like linebreaks.

관련 정보