I create my markdown files in JSON (instead of yaml or toml). And I place the main content / body as a value of a json key. I call that value via params variables.
It works reasonably well. EXCEPT when that content includes the newline character \n
There is nothing terrible happening. There just is no newline or <p>
in the generated html. The sentences are all together in one line which is not visually appealing.
Has anyone dealt with this problem? What was your hack / solution?
FYI :
- I have tried this solution. But having double slashes or
\\n
instead of\n
results in\\n
appearing the generated html which is a worse outcome. - Including multiple
\n
or\n\n
instead of\n
has no effect at all on generated html. - I have tried writing newline as unicode with this
\u000d
based on this proposal. But it doesn’t work and has not noticeable effect. - Including
U+000A
based on this has not noticeable effect either. - Apart from this, hugo handles unicode characters in the JSON value well.