line / kotlin-jdsl

Kotlin library that makes it easy to build and execute queries without generated metamodel
https://kotlin-jdsl.gitbook.io/docs/
Apache License 2.0
715 stars 89 forks source link

Proposal to Change Markdown max_line_length and Improve Line Break Handling #801

Open ririnto opened 3 days ago

ririnto commented 3 days ago

Currently, the max_line_length for Markdown files is set to 300, which results in excessively long lines. This makes the files difficult to edit and reduces readability during editing. I would like to propose the following changes:

  1. Change max_line_length Value

    • Current: 300
    • Proposed: 120
    • Reason: Reducing it to 120 is expected to make the Markdown files more manageable by limiting line width, thereby enhancing the ease of editing and readability.
  2. Improve Line Break Handling

    • Single line breaks in Markdown result in single spaces after generation. By leveraging this, we can have multiple lines in the source that display as a single line in the document.
    • For items that would look more natural with line breaks between documentation, similar to the docs: improve wording for clarity commit, adding line breaks would make the Markdown files cleaner and easier to maintain.

Markdown max_line_length 값 변경 및 줄바꿈 처리 개선 제안

현재 문서화 과정에서 사용되는 Markdown 파일의 max_line_length가 300으로 설정되어 있어, 파일을 수정할 때 가로폭이 너무 길어져 가독성과 편집의 편리성이 떨어지는 문제가 있습니다. 이에 다음과 같은 변경을 제안드립니다:

  1. max_line_length 값 변경

    • 현재: 300
    • 제안: 120
    • 이유: 120으로 줄이면 Markdown 파일의 가로폭이 적절해져 코드와 문서의 편집이 용이해질 것으로 기대됩니다.
  2. 줄바꿈 처리 개선

    • 단일 줄바꿈 시 Markdown 생성 이후 단일 공백으로 나타나므로, 이를 활용하여 여러 줄에 걸치더라도 문서에서는 단일 라인으로 표시되도록 할 수 있습니다.
    • 예를 들어, docs: improve wording for clarity 커밋의 수정처럼 문서 사이에 자연스럽게 줄바꿈이 필요한 항목들에 줄바꿈을 추가하면 Markdown 파일이 더 깔끔하게 관리될 것입니다.
shouwn commented 3 hours ago

Is this what you mean by single line breaks? If so, I think that's good, because it's hard to read when a single line gets too long.

First Line.
Seconds Line.

I think changing the max_line_length is a good idea, but it should be coupled with thinking about what to do if a sentence exceeds 120 characters.

For the Korean version, there are not many cases where it exceeds 120 characters, but for the English version, it often exceeds 120 characters, especially when class names are included.


혹시 단일 줄바꿈으로 말씀주신 게 아래와 같은 걸 말씀하시는 걸까요? 만약 그렇다면 좋다고 생각합니다. 한 줄에 너무 길게 적으면 읽기 어렵기 때문입니다.

First Line.
Seconds Line.

max_line_length를 조절하는 것은 좋다고 생각합니다. 하지만 한 문장이 120자를 넘었을 경우 어떻게 할것인지에 대한 고민이 같이 포함되어 있어야 된다고 생각합니다.

한국어 버전에서는 120자를 넘는 경우가 많이 없습니다. 하지만 영어 버전에서는 120자를 넘는 경우가 자주 보입니다. 특히 클래스 명이 포함될 경우 그런 현상이 자주 보입니다.

ririnto commented 2 hours ago

That's what I said.

With markdown, to write

First Line.
Second Line.

You have to add empty line between strings.

Like this.

First Line.

Second Line.

If don't, it will render as single line.

First Line. Second Line.

So, we can solve over 120 lengh problem with single LF.

shouwn commented 2 hours ago

You wanted it to be newline even when it was rendered.

I want it to be newline when editing, but concatenated when the user sees it.

The reason for the newlines when editing is that the IDE doesn't automatically support newlines, so you have to stretch the screen or scroll left and right to edit. But when it's rendered, I want to be able to combine the things I want to explain into a single line if they're connected, which is why I'm thinking about including only one newline instead of two.

And the 120+ characters I'm talking about is the following sentence.

Kotlin JDSL provides a domain-specific language (DSL) based on KClass and KProperty to help you easily build queries without such inconveniences from the APT.