✨ Add option to adjust alignment of text of multi-line values.#290
✨ Add option to adjust alignment of text of multi-line values.#290MiWeiss merged 4 commits intosciunto-org:masterfrom
Conversation
|
I just joined the project - sorry for the long wait. Before I start the full review - would you mind adding some unit tests to cover this functionality? Please also make sure the already existing indentation functionality works well with this. Also, please pull master to enable running the test suite on the PR :-) Thanks for opening the PR! |
|
Thanks! I'll probably add some unit tests next week or two. |
|
Hi @michaelfruth |
|
I'm lacking behind my schedule. I didn't forget to write some tests, try to do this until the end of this week. |
|
No worries! Thanks for the heads up, and for your contribution. |
A new option align_multiline_values is added to enable whether text of multiline values should be aligned on top of each other. Current behaviour: BibTeX entry: @Article{test, title = {Hello World. I'm a very very very very very very very long title. Hello Bibtex Parser! This is still a long title!}, } Parsing with BibtexParser will result in: @Article{test, title = {Hello World. I'm a very very very very very very very long title. Hello Bibtex Parser! This is still a long title!} } When align_multiline_values is set to true, the output will be the following: @Article{test, title = {Hello World. I'm a very very very very very very very long title. Hello Bibtex Parser! This is still a long title!} }
|
I've added some tests to test:
I have also encountered this behavior #315 , I'm not quite sure if this is expected. |
Review comments Co-authored-by: Michael Weiss <code@mweiss.ch>
MiWeiss
left a comment
There was a problem hiding this comment.
lgtm. thanks for your contribution!
A new option
align_multiline_valuesis added to BibTexWriter to enable whether text of multiline values should be aligned on top of each other. Indentation also considered_max_field_width.Current behaviour:
BibTeX entry:
Parsing with BibtexParser will result in:
When
align_multiline_valuesis set to true, the output will be thefollowing: