Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

common_code_blockとcommon_code_block_lstのbody処理部を切り出したい #1368

Closed
kmuto opened this issue Aug 15, 2019 · 2 comments
Closed

Comments

@kmuto
Copy link
Owner

kmuto commented Aug 15, 2019

リストのbodyに対して文字数で自動で折り返すとかの細工をしたいときに、これらのメソッドが大きな1つになっていて、bodyを変えたいという上書きをしようとするときにまるごとコピーするのが面倒め。

@kmuto
Copy link
Owner Author

kmuto commented Aug 15, 2019

と思ったけど、今でもyieldはしてるから、いちおう呼び出し側のほうで制御はできるのか。

@kmuto
Copy link
Owner Author

kmuto commented Aug 15, 2019

detab(line) + "\n"

detab((idx + first_line_num).to_s.rjust(2) + ': ' + line) + "\n"

の箇所をメソッド化するとよさそうな気がしてきました。

@kmuto kmuto closed this as completed in 247efa4 Aug 16, 2019
kmuto added a commit that referenced this issue Aug 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant