Skip to content

Conversation

@dwertheimer
Copy link
Collaborator

Summary

  • convert [[wikilinks]] in preview output into real NotePlan callback URLs (aliases, headings, block IDs supported)
  • move preview styling into dedicated file and refresh typography, spacing, list layout, and link presentation
  • bump plugin version to 1.0.0 and document the changes

@dwertheimer
Copy link
Collaborator Author

[1.0.0] - 2025-11-07 @dwertheimer

Arbitrary elevation to 1.0.0

General HTML Helper Change

  • convert [[wikilinks]] in HTML output to be real NotePlan callback URLs rather than just underlined text that does nothing
  • fix bug in showdown relative to NP to ensure horizontal rules have a blank line before them so they render properly

Preview-specific Changes

  • move preview-specific spacing and typography to previewStyles file, with:
    • table formatting
    • body padding
    • h1 line-height
    • list indentation/line-height tweaks
    • internal note links (no underline, bold on hover)
    • adjust horizontal rule appearance

@dwertheimer
Copy link
Collaborator Author

dwertheimer commented Nov 7, 2025

@jgclark one thing that bugs me but is more fundamental:

I have a wiki link then a return and some other text. Of course, in NP these are separate "Paragraphs" but in the HTML creation, they are combined into a single p tag for reasons I can't really follow. This makes creating a styling rule difficult, because I can't see why they are grouped together. I guess maybe showdown defaults to commonmark standards -- everything is together until you hit two blank lines? I don't know. but it feels to me that this is not the NotePlan assumption so things don't look right.

Screen Cap 2025-11-07 at 08 40 22@2x

If you can think of an easy way to make this look more like NotePlan, that would be great.

A similar thing is happening in this case:

Screen Cap 2025-11-07 at 09 01 20@2x

I have a list, and then a new line that is not part of the list, but the converter. adds a
and includes this item inside the list so it gets indented.

If you have any great ideas on what to do here, let me know.

@dwertheimer
Copy link
Collaborator Author

[EDIT]
I had Cursor help me create a plan for the two cases I mentioned above. It created a function called addParagraphBreakHints() which helps with this.
I asked it what other cases might fall victim to the same issues, and here's what it said. I am not making any more changes for now, but wanted you to see what you think. You may want to keep this around in your Preview project notes for the future. But I think it's better and good enough for me right now as is.

The two problem areas you reported—(1) a standalone wiki link followed by a normal line and (2) a list whose next line should start a fresh paragraph—are really just examples of a broader “markdown paragraphs vs. NotePlan paragraphs” mismatch. Anywhere NotePlan would treat consecutive lines as separate paragraphs, but showdown would normally keep them in the same block, you might notice similar issues. Cases to watch for:
Code or quote blocks breaking context: If Showdown thinks a line continues the previous block (e.g., indented code, > quote lines) but NotePlan treats it as a fresh paragraph, the outputs can differ.
Headings followed by inline content: A heading line that isn’t separated by a blank line can end up merged with the following paragraph unless we hint a break.
Checklist vs. narrative lines: When a checklist item is followed immediately by plain text or a different list type, without a blank in between, Showdown may keep them together.
Task vs. metadata lines: A - [ ] task line and a subsequent key:: value line (or similar “metadata” prefix) can get bundled even though NotePlan renders them separately.
Mixed HTML/markdown: Inline HTML (like or

) followed by regular markdown can also swallow the next line if there’s no blank separator.
Any “single-line paragraph”: Any standalone line (note link, floaters like [link], or short callouts) followed immediately by another paragraph, with no blank line, is a candidate.
The preprocessing step we added (inserting a hint blank line after isolated wiki links or when jumping from list → non-list) covers the two cases you saw, but consider expanding it for any other transitions that should force a new block. If you spot additional patterns, we can extend the helper with more rules (e.g., heading→text, checklist→plain text, etc.) so the HTML stays visually in sync with NotePlan’s paragraph model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants