Closed paxsali closed 1 year ago
This isn't a bug/fault of the theme, but rather the source text in question; The text appears to have been made without word wrap in mind, so the author intentionally added line breaks for readability. To fix this, you should delete the line breaks where they occur, manually. But if you wish to keep the text as-is, then I recommend changing the font size in the settings.
Font Size 16 (default)
Font Size 12
@nucspl is right about the source text. In the plaintext screenshots, there are new lines within paragraphs.
If you’d like to retain the one-paragraph look, Obsidian has a setting about line breaks in Editor, if I remember correctly.
Closing this now 👍🏻
Guys, pls don't get ahead of yourselves, ok?
We are talking about basic markdown here.
If you don't manually add HTML breaks <br>
or if you don't add two spaces at the end of the line, the lines will not break in the rendering.
Markdown documentation:
You two are simply incorrect about the linebreaks of the source file and it was perfectly clear from my descriptions (I put so much effort in this, guys. Come on!).
What did you not get from my direct comparison screenshots with the default theme from section Screenshots / Correct, 1.) and 2.)?
The underlying markdown is exactly the same, yet there are different ways of rendering, depending on the theme being used.
I thought I made myself clear and I feel like you didn't even read any of my explanation.
Here's some more evidence to make it 100% clear:
$ sed -n 2076,2080p 'V docs.md' | od -a
0000000 V sp a l l o w s sp u n c o n d i
0000020 t i o n a l l y sp j u m p i n g
0000040 sp t o sp a sp l a b e l sp w i t h
0000060 sp ` g o t o ` . sp T h e sp l a b
0000100 e l sp n a m e sp m u s t sp b e sp
0000120 c o n t a i n e d nl w i t h i n
0000140 sp t h e sp s a m e sp f u n c t i
0000160 o n sp a s sp t h e sp ` g o t o `
0000200 sp s t a t e m e n t . sp A sp p r
0000220 o g r a m sp m a y sp ` g o t o `
0000240 sp a sp l a b e l sp o u t s i d e
0000260 nl o r sp d e e p e r sp t h a n sp
0000300 t h e sp c u r r e n t sp s c o p
0000320 e . sp ` g o t o ` sp a l l o w s
0000340 sp j u m p i n g sp p a s t sp v a
0000360 r i a b l e sp i n i t i a l i z
0000400 a t i o n sp o r nl j u m p i n g
0000420 sp b a c k sp t o sp c o d e sp t h
0000440 a t sp a c c e s s e s sp m e m o
0000460 r y sp t h a t sp h a s sp a l r e
0000500 a d y sp b e e n sp f r e e d , sp
0000520 s o sp i t sp r e q u i r e s nl `
0000540 u n s a f e ` . nl
0000551
No HTML linebreaks! No double spaces at the end of the line!
I hope that resolves the question about the source file.
You can compare it to any other theme. You can take any other markdown example files, if you feel more comfortable with it.
The issue needs to be re-opened, IMHO.
Obsidian is a glorified text editor which uses markdown as a means of formatting notes. It has word wrap on by default, and therefore doing line breaks via HTML (<br>
) isn't necessary, but is still however possible. As you say, there really are no HTML line breaks in the source file, but if you actually take a look, you'll see "nl" in the very "evidence" of an sed view you sent, marking a "new line".
As mentioned above, if you want the issue to be "resolved", you can: A.) enable "strict line breaks" in Editor settings; B.) shrink your font size; or C.) delete the newlines yourself. If the rendering is "wrong" as you say, then you should bring this up with the Obsidian devs via bug report, as Typewriter barely touches anything outside of colors and fonts.
@nucspl is right that this issue is out of scope for Typewriter. As a theme, Typewriter can only change the look and feel of Obsidian (and not much else). There have been a few workarounds suggested in this thread you can refer to, including removing newlines within the paragraph, in the meantime.
Thanks for explaining that option "strict line breaks".
I was runnning the default settings of Obsidian, so that option was turned off. It's also confusing to me why this option is under "Editor" and not under "Appearance".
Since I wasn't even aware of this option, my assumption was that some CSS code in the theme breaks the intended Markdown syntax.
Sorry about that.
Describe the bug
Hello, the Typewriter theme currently produces unnecessary line breaks, where there should be none accoding to markdown syntax. There are also no HTML line breaks or otherwise hidden directives in the documents which cause a line break.
My current estimation is that the issue may be related to the fonts used in this theme.
To Reproduce
Steps to reproduce the behavior:
Result will be, that very often there will be line breaks where there shouldn't (read: mustn't) be line breaks.
You can cross verify this by clicking on settings while the document is open and then interactively switch to the default Obsidian theme and then back to Typewriter theme.
You can also verify by downloading several other themes and compare it with Typewriter theme.
In fact, any themes I tried don't break the line where they shouldn't.
Information
Screenshots
Wrong
Correct
Markdown evidence
Here are the markdown sections in plaintext to prove there are no line breaks in the documents (from the sections in the screenshots):
Suggestions/Workarounds
None.
Remarks
You can use any markdown document to cross-verify this bug. I just happened to notice it in this "V" documentation (programming language) I was browsing at the time.
I'm using Obsidian for >= 1 years now and today I tried the Typewriter theme, because I liked the colors. However this thing where line breaks appear where none should be is annoying. I'd like to keep using this theme. Good luck finding / fixing this bug!