[PR #1013] [MERGED] Feature/add code fence buttons to cloud markdown #1082

Closed
opened 2026-03-03 00:24:33 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BoostIO/BoostNote-App/pull/1013
Author: @Komediruzecki
Created: 6/20/2021
Status: Merged
Merged: 6/23/2021
Merged by: @Rokt33r

Base: masterHead: feature/add-code-fence-buttons-to-cloud-markdown


📝 Commits (3)

  • f24b935 Update CodeFence and use it in Cloud
  • 2dd0d5c Fix mode and mime being null
  • 710f76d Refactor codemirror loading of mode to shared util

📊 Changes

13 files changed (+96 additions, -239 deletions)

View changed files

📝 src/cloud/components/atoms/HighlightedCode.tsx (+1 -1)
📝 src/cloud/components/atoms/MarkdownView/index.tsx (+3 -1)
📝 src/cloud/lib/editor/CodeMirror.ts (+1 -34)
📝 src/cloud/lib/editor/components/CodeMirrorEditor.tsx (+1 -1)
📝 src/cloud/lib/export.ts (+2 -2)
📝 src/components/atoms/CodeEditor.tsx (+2 -1)
📝 src/components/atoms/MarkdownPreviewer.tsx (+3 -127)
📝 src/components/organisms/SearchModal.tsx (+1 -1)
📝 src/lib/CodeMirror.ts (+1 -38)
📝 src/lib/exports.ts (+2 -2)
📝 src/shared/components/atoms/markdown/CodeFence.tsx (+4 -4)
📝 src/shared/lib/codemirror/rehypeCodeMirror.ts (+32 -27)
src/shared/lib/codemirror/util.ts (+43 -0)

📄 Description

Add code fence to cloud

  • Refactor CodeFence and rehype attacher to shared components
  • Add load mode function to shared codemirror util

Tested in:
Webapp dev (cloud space)
Desktop app dev (cloud and local space)

Tests:

  • try saving snippet (works)
  • try copy/pasting snippet (works)
  • export note with snippets (HTML, PDF, Markdown)
    • works but previous bug with incorrect styles for cloud space (PDF export only) is making code blocks invisible (white text, white background) - should be fixed in another PR

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BoostIO/BoostNote-App/pull/1013 **Author:** [@Komediruzecki](https://github.com/Komediruzecki) **Created:** 6/20/2021 **Status:** ✅ Merged **Merged:** 6/23/2021 **Merged by:** [@Rokt33r](https://github.com/Rokt33r) **Base:** `master` ← **Head:** `feature/add-code-fence-buttons-to-cloud-markdown` --- ### 📝 Commits (3) - [`f24b935`](https://github.com/BoostIO/BoostNote-App/commit/f24b9350a4a023b80bca584b506fb5a0b82d8513) Update CodeFence and use it in Cloud - [`2dd0d5c`](https://github.com/BoostIO/BoostNote-App/commit/2dd0d5cdfd0ce1a74608616ce94bafcbde44bbc7) Fix mode and mime being null - [`710f76d`](https://github.com/BoostIO/BoostNote-App/commit/710f76d1e174dc706ca11dc8cb45fcf2c65d91cd) Refactor codemirror loading of mode to shared util ### 📊 Changes **13 files changed** (+96 additions, -239 deletions) <details> <summary>View changed files</summary> 📝 `src/cloud/components/atoms/HighlightedCode.tsx` (+1 -1) 📝 `src/cloud/components/atoms/MarkdownView/index.tsx` (+3 -1) 📝 `src/cloud/lib/editor/CodeMirror.ts` (+1 -34) 📝 `src/cloud/lib/editor/components/CodeMirrorEditor.tsx` (+1 -1) 📝 `src/cloud/lib/export.ts` (+2 -2) 📝 `src/components/atoms/CodeEditor.tsx` (+2 -1) 📝 `src/components/atoms/MarkdownPreviewer.tsx` (+3 -127) 📝 `src/components/organisms/SearchModal.tsx` (+1 -1) 📝 `src/lib/CodeMirror.ts` (+1 -38) 📝 `src/lib/exports.ts` (+2 -2) 📝 `src/shared/components/atoms/markdown/CodeFence.tsx` (+4 -4) 📝 `src/shared/lib/codemirror/rehypeCodeMirror.ts` (+32 -27) ➕ `src/shared/lib/codemirror/util.ts` (+43 -0) </details> ### 📄 Description **Add code fence to cloud** - Refactor CodeFence and rehype attacher to shared components - Add load mode function to shared codemirror util Tested in: Webapp dev (cloud space) Desktop app dev (cloud and local space) Tests: - try saving snippet (works) - try copy/pasting snippet (works) - export note with snippets (HTML, PDF, Markdown) - works but previous bug with incorrect styles for cloud space (PDF export only) is making code blocks invisible (white text, white background) - should be fixed in another PR --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 00:24:33 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
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
starred/BoostNote-App#1082
No description provided.