Comments (6)
Happy new year! v22.1.0 is out now with a new --hard-linebreaks
CLI argument. It appears to work as intended on my basic, exploratory testing, but please feel free to let me know if you run into unexpected issues on a real vault.
from obsidian-export.
Hey @ih8snow,
I suspect you have the option Strict line breaks
(found under the Editor
options setting) turned off in your Obsidian settings, is that right?
Strictly speaking, Markdown/CommonMark, ignores linebreaks. That is, the following text is rendered as a single sentence:
This is a line
which is split across multiple lines
in markdown source text.
If you want insert hard linebreaks here, there's two ways you can do this with Markdown. The first option is to append two blank spaces (
) at the end of the lines:
This is a line
which is split across multiple lines
in markdown source text.
The other option, which I personally prefer and recommend, is to add a backslash at the end of the line:
This is a line \
which is split across multiple lines \
in markdown source text.
Does that help?
from obsidian-export.
Some more good news. 😄 I took a look at the information provided by the underlying parser, and it turns out it emits SoftBreak events for these soft linebreaks in your original example.
I'm able to use this information to turn these SoftBreaks into HardBreaks, which should mimic Obsidian's Strict line breaks
option. With all of the postprocessor infrastructure I introduced in v0.7.0 (2021-04-11) this is quite trivial to implement now and I already have a working proof of concept implementation.
I just need to organize this new code properly, hook it up to a CLI argument, add some testcases, etc. so expect a new feature and release with this somewhere over the next week or so.
from obsidian-export.
I suspect you have the option
Strict line breaks
(found under theEditor
options setting) turned off in your Obsidian settings, is that right?
Hi,
you are correct. I'm using these settings. Thanks for your explanation, that definitely helps. I was not really sure what these settings will cause in the work with obsidian, but now I can see it more clear.
from obsidian-export.
I'm able to use this information to turn these SoftBreaks into HardBreaks, which should mimic Obsidian's
Strict line breaks
option.
That is super cool! Great news at the end of the year.
I'll test with the above-mentioned settings and of course wait for the new version.
Many thanks for your support!
from obsidian-export.
Thanks!!!
Works perfect!
from obsidian-export.
Related Issues (20)
- Allow us to strip date from link generated
- Builds fail due to linting error HOT 3
- preserve mtime of source file
- Include titles
- Can't export to pdf with typst, unrecongnized subcommand HOT 1
- Why the restriction on symlinked folders?
- [Feature Request] Create tag to partially ignore content within a file. HOT 2
- Warning: Unable to find referenced note, is too verbose.
- Export only labeled files HOT 3
- Angular brackets incorrectly escaped in embedded Latex
- Postprocessor type does not enable storing state in the postprocessor
- Warning: Unable to find embedded note Reference: 'xxx' HOT 1
- Wikilinks filename followed by space not linked properly HOT 1
- Feature Request: continue even if error HOT 2
- Embedded link blocks don't work properly HOT 2
- Allow specifying directory relative to root for `--start-at`
- Flag for export only nesessary attachements HOT 2
- allow for custom filter function
- 【feature request】adding GUI for easy usage HOT 1
- [Bug] --only-tags option includes files that do not have tags
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from obsidian-export.