瀏覽代碼

chore: replace # with - for introduction text

Tienson Qin 4 年之前
父節點
當前提交
e7318336e3
共有 2 個文件被更改,包括 24 次插入30 次删除
  1. 23 26
      src/main/frontend/dicts.cljs
  2. 1 4
      src/main/frontend/text.cljs

+ 23 - 26
src/main/frontend/dicts.cljs

@@ -3,31 +3,28 @@
             [frontend.config :as config]))
             [frontend.config :as config]))
 
 
 (def dicts
 (def dicts
-  {:en {:tutorial/text "# Hi, welcome to Logseq!
-:PROPERTIES:
-:heading: true
-:END:
-# Logseq is a _privacy-first_, _open-source_ platform for _knowledge_ sharing and management.
-# This is a 3 minute tutorial on how to use Logseq. Let's get started!
-# (Feel free to edit anything, no change will be saved at this moment. If you do want to persist your work, click the **top-right** corner of the screen to connect Logseq to either Github or local directory.)
-# Here are some tips might be useful.
+  {:en {:tutorial/text "## Hi, welcome to Logseq!
+- Logseq is a _privacy-first_, _open-source_ platform for _knowledge_ sharing and management.
+- This is a 3 minute tutorial on how to use Logseq. Let's get started!
+- (Feel free to edit anything, no change will be saved at this moment. If you do want to persist your work, click the **top-right** corner of the screen to connect Logseq to either Github or local directory.)
+- Here are some tips might be useful.
 #+BEGIN_TIP
 #+BEGIN_TIP
 Click to edit any block.
 Click to edit any block.
 Type `Enter` to create a new block.
 Type `Enter` to create a new block.
 Type `Shift+Enter` to create a new line.
 Type `Shift+Enter` to create a new line.
 Type `/` to show all the commands.
 Type `/` to show all the commands.
 #+END_TIP
 #+END_TIP
-# 1. Let's create a page called [[How to take dummy notes?]]. You can click it to go to that page, or you can `Shift+Click` to open it in the right sidebar! Now you should see both _Linked References_ and _Unlinked References_.
-# 2. Let's reference some blocks on [[How to take dummy notes?]], you can `Shift+Click` any block reference to open it in the right sidebar. Try making
+- 1. Let's create a page called [[How to take dummy notes?]]. You can click it to go to that page, or you can `Shift+Click` to open it in the right sidebar! Now you should see both _Linked References_ and _Unlinked References_.
+- 2. Let's reference some blocks on [[How to take dummy notes?]], you can `Shift+Click` any block reference to open it in the right sidebar. Try making
 some changes on the right sidebar, those referenced blocks will be changed too!
 some changes on the right sidebar, those referenced blocks will be changed too!
-## ((5f713e91-8a3c-4b04-a33a-c39482428e2d)) : This is a block reference.
-## ((5f713ea8-8cba-403d-ac00-9964b1ec7190)) : This is another block reference.
-# 3. Do you support tags?
-## Of course, this is a #dummy tag.
-# 4. Do you support tasks like todo/doing/done and priorities?
-## Yes, type `/` and pick your favorite todo keyword or priority (A/B/C).
-## NOW [#A] A dummy tutorial on \"How to take dummy notes?\"
-## LATER [#A] Check out this awesome video by [:a {:href \"https://twitter.com/EdTravelling\" :target \"_blank\"} \"@EdTravelling\"], which shows how to use logseq to open your local directory.
+    - ((5f713e91-8a3c-4b04-a33a-c39482428e2d)) : This is a block reference.
+    - ((5f713ea8-8cba-403d-ac00-9964b1ec7190)) : This is another block reference.
+- 3. Do you support tags?
+    - Of course, this is a #dummy tag.
+- 4. Do you support tasks like todo/doing/done and priorities?
+    - Yes, type `/` and pick your favorite todo keyword or priority (A/B/C).
+    - NOW [#A] A dummy tutorial on \"How to take dummy notes?\"
+    - LATER [#A] Check out this awesome video by [:a {:href \"https://twitter.com/EdTravelling\" :target \"_blank\"} \"@EdTravelling\"], which shows how to use logseq to open your local directory.
 
 
 [:div.video-wrapper.mb-4
 [:div.video-wrapper.mb-4
         [:iframe
         [:iframe
@@ -38,22 +35,22 @@ some changes on the right sidebar, those referenced blocks will be changed too!
         :src \"https://www.youtube.com/embed/Afmqowr0qEQ\"
         :src \"https://www.youtube.com/embed/Afmqowr0qEQ\"
         :height \"367\"
         :height \"367\"
         :width \"653\"}]]
         :width \"653\"}]]
-## DONE Create a page
-## CANCELED [#C] Write a page with more than 1000 blocks
-# That's it! You can create more bullets or open a local directory to import some notes now!
-# You can also download our desktop app at https://github.com/logseq/logseq/releases
+    - DONE Create a page
+    - CANCELED [#C] Write a page with more than 1000 blocks
+- That's it! You can create more bullets or open a local directory to import some notes now!
+- You can also download our desktop app at https://github.com/logseq/logseq/releases
 "
 "
         :tutorial/dummy-notes "---
         :tutorial/dummy-notes "---
 title: How to take dummy notes?
 title: How to take dummy notes?
 ---
 ---
 
 
-# Hello, I'm a block!
+- Hello, I'm a block!
 :PROPERTIES:
 :PROPERTIES:
 :id: 5f713e91-8a3c-4b04-a33a-c39482428e2d
 :id: 5f713e91-8a3c-4b04-a33a-c39482428e2d
 :END:
 :END:
-## I'm a child block!
-## I'm another child block!
-# Hey, I'm another block!
+    - I'm a child block!
+    - I'm another child block!
+- Hey, I'm another block!
 :PROPERTIES:
 :PROPERTIES:
 :id: 5f713ea8-8cba-403d-ac00-9964b1ec7190
 :id: 5f713ea8-8cba-403d-ac00-9964b1ec7190
 :END:
 :END:

+ 1 - 4
src/main/frontend/text.cljs

@@ -120,10 +120,7 @@
      text
      text
 
 
      :else
      :else
-     (let [text' (remove-level-space-aux! text (config/get-block-pattern format) space?)]
-       (if (and (= format :markdown) (= text text') )
-         (remove-level-space-aux! text "#" space?)
-         text')))))
+     (remove-level-space-aux! text (config/get-block-pattern format) space?))))
 
 
 (defn append-newline-after-level-spaces
 (defn append-newline-after-level-spaces
   [text format]
   [text format]