Codimd: Insert additional separators to the HTML title if the 1st level heading contains raw line breaks `<br>`

Created on 1 Mar 2018  路  5Comments  路  Source: hackmdio/codimd

Issue Demonstration Screenshot

Rationale

It is possible to insert line breaks in 1st level headings by exploiting the <br> tag, however this generates ugly HTML title as the line break isn't represented. Please support inserting additional separators like , - or | where the line breaks are available to make it less uglier.

Bonus

Allow user to decide the behavior and separator pattern via note metadata.

Additional Information

This also includes Book Mode and Slide Mode, which is HackMD EE features.

bug

Most helpful comment

@Lin-Buo-Ren You can set the title in the yaml header, separate from the H1 of the slide
see https://github.com/hackmdio/codimd/wiki/Slide-Options#basic-yaml-header

---
title: Example Slide
tags: presentation
---

All 5 comments

I'm not sure I understand your suggestion?

You can use <br> in headlines (see https://hackmd.io/MwDgjATAJlAMCmBaArLCBjRAWVSCc88eiMwwEAbAEYCGAZulFkA= ), and it is shown correctly in the document view and in the slides. What am I missing?

Sorry for the delay, I've updated the screenshot to made it more clear.

completely my fault, I missed "html title". Yes, this is indeed not ideal.

If someone wants to play with this but has no idea where to start:

https://github.com/hackmdio/codimd/blob/b1d1f469de7d5df8b58c9dee94b23c1cf7527b91/lib/models/note.js#L286-L296

This should fix it.

@Lin-Buo-Ren You can set the title in the yaml header, separate from the H1 of the slide
see https://github.com/hackmdio/codimd/wiki/Slide-Options#basic-yaml-header

---
title: Example Slide
tags: presentation
---
Was this page helpful?
0 / 5 - 0 ratings

Related issues

qiuwch picture qiuwch  路  3Comments

LukasKalbertodt picture LukasKalbertodt  路  4Comments

farleylai picture farleylai  路  5Comments

sagesharp picture sagesharp  路  4Comments

SISheogorath picture SISheogorath  路  4Comments