Insert newlines when exporting html #105

Open
opened 3 years ago by casouri · 2 comments
casouri commented 3 years ago (Migrated from github.com)

By default, ->html generates a single line of HTML. Is there any way to insert newlines before & after tags?

I should add that I use decode-paragraphs for post-processing so hard-coded newlines are processed out IIUC.

By default, `->html` generates a single line of HTML. Is there any way to insert newlines before & after tags? I should add that I use `decode-paragraphs` for post-processing so hard-coded newlines are processed out IIUC.
otherjoel commented 3 years ago (Migrated from github.com)

In the past I've built sites with a makefile that runs the output through tidy after Pollen has generated it. (example)

You might also try rolling your own ->html function that composes display-xml/content within with-output-to-file.

In the past I've built sites with a makefile that runs the output through [tidy][] after Pollen has generated it. ([example][1]) You might also try rolling your own `->html` function that composes [`display-xml/content`][2] within [`with-output-to-file`][3]. [1]: https://github.com/otherjoel/thenotepad/blob/94fb86a6d1ccef5c3106594615898845b7c97568/makefile#L49-L51 [2]: https://docs.racket-lang.org/xml/index.html#(def._((lib._xml%2Fmain..rkt)._display-xml%2Fcontent)) [3]: https://docs.racket-lang.org/reference/file-ports.html#(def._((lib._racket%2Fprivate%2Fbase..rkt)._with-output-to-file)) [tidy]: http://www.html-tidy.org/
casouri commented 3 years ago (Migrated from github.com)

Thanks, tidy is really handy. It probably does the job way better than what I could've come up with so I'll use that.

Thanks, tidy is really handy. It probably does the job way better than what I could've come up with so I'll use that.
This repo is archived. You cannot comment on issues.
No Milestone
No project
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mbutterick/pollen-users#105
Loading…
There is no content yet.