Merged
Conversation
5b3b516 to
bb3340a
Compare
9d6bb52 to
5c18f5b
Compare
736ffc8 to
9f80d9a
Compare
Add export note markdown to PDF in note page toolbar Add render_md_to_pdf.html file for rendering markdown to HTML first Add logic for printing to PDF via webContents.printToPdf Refactor note title sanitization to shared function
Refactor code to not use any static HTML file (and thus no javascript, safer for XSS) Refactor code to be more readable Reorder menu items for md, html and pdf Refactor includeFrontMatter fetching Add support for mathml rendering in PDF export (fix escapes) Add support for proper header and footer in PDF - Include front matter option in Markdown - Export section to get header and footer
Rokt33r
requested changes
Nov 21, 2020
| const getFrontMatter = (note: NoteDoc): string => { | ||
| return [ | ||
| '---', | ||
| `title: "${note.title}"`, |
Member
There was a problem hiding this comment.
We should sanitize title and tags to prevent syntax errors
Contributor
Author
There was a problem hiding this comment.
Oh, I see, I just extracted this method, so didn't know.
See you fixed it with yaml, thx!
| return [ | ||
| '---', | ||
| `title: "${note.title}"`, | ||
| `tags: "${note.tags.join()}"`, |
Member
There was a problem hiding this comment.
Tags should be yaml compatible list, not a concatenated string
| import CodeFence from '../components/atoms/markdown/CodeFence' | ||
| import { getGlobalCss, selectTheme } from './styled/styleUtil' | ||
|
|
||
| const sanitizeNoteName = function (rawNoteName: string): string { |
Member
There was a problem hiding this comment.
filenamifyNoteName should be better.
9f80d9a to
3a7c833
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add export note to PDF (3e6abd4)
Add export note markdown to PDF in note detail
Add render_md_to_pdf.html file for rendering markdown to HTML first
Add logic for printing to PDF via webContents.printToPdf
Refactor note title sanitization to shared function
Add support for global css style in exports.ts
Add support for wrapping long lines when exporting pre and code through markdown and codemirror sections
Refactor export note to PDF (9f80d9a)
Refactor code to not use any static HTML file (and thus no javascript, safer for XSS)
Refactor code to be more readable
Reorder menu items for md, html and pdf
Refactor includeFrontMatter fetching
Add support for mathml rendering in PDF export (fix escapes)
Add support for proper header and footer in PDF
Test:
In electron Linux App
In electron Linux App production version (appImage)
Todo:
IssueHunt Summary
Referenced issues
This pull request has been submitted to: