Headers rendered inconsistently in markdown

I have a dalily journal template in my config.edn file that creates a number of headers. In order that things indented under the headers don’t appear as code in Obsidian and other markdown editors, I precede the headers with a - which renders as a bullet in all editors and makes anything indented under the header appear as indented bullets rather than code. Most editors also render the header properly even with the bullet in front of it.

The issue comes with how Logseq writes the blocks as markdown. When I first create the daily journal nothing is saved to file of course. So I add a random letter to the end of the first header. The file then saves as below:

- - ## 💡 Journaln
- ## ⛓️ Habits
	- ### Languages
	  Polish:: 
	  German:: 
	  Spanish:: 
	  Italian:: 
	  French::
	- ### Exercise
	  Run:: 
	  Press:: 
	  Dips:: 
	  Curls:: 
	  Raises::
- ## 📃 Notes
- ## 🕧 Daily Log

Weirdly the first line has two dashes even though there is only one in the template.

If I then go to the end of the Notes block and hit return to create a new block below it, the file changes to

- - ## 💡 Journaln
- ## ⛓️ Habits
	- ### Languages
	  Polish:: 
	  German:: 
	  Spanish:: 
	  Italian:: 
	  French::
	- ### Exercise
	  Run:: 
	  Press:: 
	  Dips:: 
	  Curls:: 
	  Raises::
## 📃 Notes
-
## 🕧 Daily Log

Now the dashes before the Notes and Daily Log lines have been removed. This makes any indented blocks below them appear as code again in other browsers.

And, finally, if I indent the Notes block and simply outdent it again, the dash reappears in the markdown.

Could this be fixed so that the preceeding dashes are not removed from headers in order to have a consistent representation in markdown. I would rather they were never removed instead of always removed so that indented blocks appear correctly as bullets in Obsidian and other editors rather than as code.

Thanks,
David

Did you notice that Logseq v0.2.8 (and a few earlier versions) only convert:
- ## with leading bullet into ## without leading bullet.
Logseq doesn’t convert:
░░░░- ### with indented leading bullet into ### without leading bullet.

The ## without leading bullet are correctly rendered as headings in other common Markdown editors. That also allow normal Markdown non-outline freeform text to be edited in Logseq. More about this in Allow non-outline (freeform) text, particularly Pihentagy reply in that topic on 15 July 2021 and Sabre23t reply on 17 July 2021 as of Logseq v0.2.5.

I can understand people not wanting bullets if they are doing free form writing. The issue only arises when you indent something under a level 2 heading. Then in Obsidian and Typora for example, the indented items appear in a code block rather than as bullets. If you want the indented items to be bullets you have to bullet the header. At the moment LogSeq is removing the bullet in some circumstances and not in others which gives inconsistent results.

I would suggest a fixed rule:

If the level 2 header is not indented and has no indented children then remove the bullet. Otherwise keep it.

1 Like

I think, that’s a bit too complicated. :thinking:

Why don’t we just ask for no automatic conversion of - # to #? Instead have a bulletless heading command that will convert bulleted headings into bulletless headings? Also ask for those # bulletless heading to be displayed as actually bulletless? @dcoales agree?

In example below Logseq v0.2.8 displays H-1 (bulleted heading) exactly the same as H-2 (bulletless heading). That’s really confusing. More so when you click H-1, press enter, Logseq will silently/invisibly convert that H-1 into bulletless heading.

Logseq Heading Ex 4 2021-07-26 091750

Typora displays bulletless and bulleted headings nicely

Logseq Heading Ex 4 Typora 2021-07-26 094517

1 Like

That would work for me. I would be very happy if removing the bullets was an explicit choice the user had to make - otherwise they always stayed. The current inconsistent implementation is causing a mess with the presentation of my notes in Obsidian.

I’m currently experiencing the issue. The indented items under a header without a - appear as code in other markdown editors.

Did any development happen here or are there possible workarounds that I’m not aware of?

Are there any solutions for this yet? I would prefer that all lines start with a hyphen, whether it’s a header or not. This is still a problem for indented lines below headers without the hyphen when the markdown files are opened in other programs.

I think this solution should be the best way to handle the heading problem. Moreover, any update about the heading issue?