Go to file Use this template
naive231 426aa5af20 修复了列表项编号错误的问题。主要改动包括:
1. 添加了 `topLevelCounter` 来专门追踪顶级列表项的计数。
2. 修改了缩进级别变化时的计数器处理逻辑。
3. 改进了计数器数组的维护方式。

这些修改确保:
- 顶级列表项正确从 1 递增到 2。
- 子列表项的编号正确跟随其父级列表项。
- 同级列表项保持正确的序号。

修复后:
- "不管是對內的組織管理..." 会显示为 "1.2"。
- "以生成式人工智慧技術..." 会显示为 "2"。
- 所有子项的编号也会相应正确调整。
2024-11-19 14:51:58 +08:00
.editorconfig use LF instead of CRLF (#28) 2022-04-15 14:13:31 -04:00
.eslintignore fix .eslintignore (#48) 2023-01-19 10:06:51 -05:00
.eslintrc add version bump script (#10) 2022-01-22 16:13:50 -05:00
.gitignore 2024-11-14 23:56:13 +08:00
.npmrc add version bump script (#10) 2022-01-22 16:13:50 -05:00
LICENSE Create LICENSE 2024-11-15 17:10:09 +08:00
README.md Update README.md 2024-11-15 17:04:44 +08:00
env.vim Refactored the `processLineBlock` function in `main.ts` to improve list item handling and formatting. Updated the `applyFormatting` function to include additional formatting rules. Also modified `env.vim` to add `main.ts` to the argument list and set the make program to `tsc`. 2024-11-15 00:34:16 +08:00
esbuild.config.mjs build: minify prod build 2023-11-15 14:10:43 -05:00
main.ts 修复了列表项编号错误的问题。主要改动包括: 2024-11-19 14:51:58 +08:00
manifest.json [fix] Change 'id' and 'name' to align with 'community-plugins.json' of 'obsidian-releases' repo. 2024-11-16 07:37:39 +08:00
package.json Upgrade esbuild to v0.17.x (#47) 2023-01-25 13:49:50 -05:00
styles.css Update sample css file. 2022-08-09 13:39:02 -04:00
tsconfig.json Fix inconsistent indentation 2024-01-19 21:14:58 +02:00
version-bump.mjs add version bump script (#10) 2022-01-22 16:13:50 -05:00
versions.json Update for 0.15 2022-08-09 13:38:50 -04:00

README.md

Obsidian-flavor Markdown texts to LINE-flavor messages

The goal of this plugin is to convert Obsidian-flavored Markdown texts to messages based on LINE Messenger Chat message formats.

Simple texts conversions

Here are some supported Obsidian-flavored Markdown texts:

1. **bold**
2. *italic*
3. ~~strike~~
4. ==emphasize==
5. `quote`
6. - [ ] unchecked
7. - [x] checked
8. # heading1
9. ## heading2

According the reference source in Formatting chat messages, it will convert them into:

1. {*bold*}
2. {_italic_}
3. {~strike~}
4. {`emphasize`}
5. {{quote}}
6. {🟩} unchecked
7. {✅} checked
8. 【 heading1  】
9. ▋heading2

The "{xxx}" should be replaced with a space character. For example, the "{*bold}" should be the " bold ".

Hierarchical Numbering List

If we have list texts like this:

1. itemA
	1. ia1
	2. ia2
2. itemB
	1. ib1
	2. ib2
3. itemC
	1. ic1
	2. ic2
		1. ic21

Or this:

- itemA
	- ia1
	- ia2
- itemB
	- ib1
	- ib2
- itemC
	- ic1
	- ic2
		- ic21

It will convert the list to hierarchical numbering list:

1. itemA
1.1 ia1
1.2 ia2
2. itemB
2.1 ib1
2.2 ib2
3. itemC
3.1 ic1
3.2 ic2
3.2.1ic21

Each item in hierarchical list should be on a new line without any indents.

Usage

Chinese texts are also supported. After installed and enabled the plugin, when you fill Obsidian-flavor Markdown texts into a "line" code block like this:

```line
# 主標題

這裡有一段文字,用來測試**粗體**,*斜體*,~~刪除線~~,==強調文字==,和`引言`.

## 次標題

在清單中的表現是這樣的:

1. **粗體**
	1. 數字清單測試A
	2. 數字清單測試B
		1. 數字清單測試C
2. *斜體*
3. ~~刪除線~~
4. ==強調文字==
5. `引言`
- [ ] 未完成項目
	- 符號清單測試A
		- 符號清單測試B
	- 符號清單測試C
- [x] 已完成項目

This plugin should convert those texts to this:

【 主標題 】

這裡有一段文字,用來測試 *粗體* , _斜體_ , ~刪除線~ ,  `強調文字` ,和 {引言} .

▋ 次標題

在清單中的表現是這樣的:

1. *粗體*
1.1 數字清單測試A
1.2 數字清單測試B
1.2.1 數字清單測試C
2.  _斜體_ 
3.  ~刪除線~ 
4.  `強調文字` 
5.  {引言} 

🟩 1. 未完成項目
1.1 符號清單測試A
1.1.1 符號清單測試B
1.2 符號清單測試C
✅ 2. 已完成項目

Others

Adding your plugin to the community plugin list

Manually installing the plugin

  • Copy over main.js, styles.css, manifest.json to your vault VaultFolder/.obsidian/plugins/your-plugin-id/.

Funding URL

You can include funding URLs where people who use your plugin can financially support it.

The simple way is to set the fundingUrl field to your link in your manifest.json file:

{
    "fundingUrl": "https://buymeacoffee.com"
}