Loading...
Loading...
Compare original and translation side by side
/convert-plaintext-to-md <#file:{{file}}> [finalize] [guide #file:{{reference-file}}] [instructions] [platform={{name}}] [options] [pre=<name>]/convert-plaintext-to-md <#file:{{file}}> [finalize] [guide #file:{{reference-file}}] [instructions] [platform={{name}}] [options] [pre=<name>]{{file}}.mdcopy FILE FILE.md{{file}}.mdcopy FILE FILE.md{{[-p, --pattern]}}{{[-s, --stop]}} eof-s [0-9]+[0-9]+{{[-p, --pattern]}}{{[-s, --stop]}} eof-s [0-9]+[0-9]+/convert-plaintext-to-md pre=<name>/convert-plaintext-to-md pre=<name>xyx[!NOTE] If there is no matching predefine, then disregard thefor the current prompt.pre=name
xyx[!NOTE] 如果没有匹配的预定义内容,则忽略当前提示中的参数。pre=name
/convert-plaintext-to-md #fileI see there is no corresponding `file.md`. Let me copy the plaintext document:
```bash
cp file file.md
```
Now I'll apply markdown best practices to convert the plaintext documentation to a markdown document./convert-plaintext-to-md #file我发现不存在对应的`file.md`文件。我将复制纯文本文档:
```bash
cp file file.md
```
现在我将应用Markdown最佳实践,将纯文本文档转换为Markdown文档。/convert-plaintext-to-md #file.md --guide #CODE.mdI see that both the file and CODE markdown files have corresponding plaintext documentation. Let me
check CODE and compare it to CODE.md, and identify patterns to help with conversion.
CODE
```text
Title
Text in opening.
1. Section
1.1 Section Item
=============================================
1. Section
1.1
Full details of section item.
```
And looking at CODE.md:
CODE.md
```markdown
# Title
Text in opening.
### [Section](#1-section)
- [1.1](#11) Section Item but Only Numbers in Sub-heading
***
## 1. Section
### 1.1
Full details of section item.
```
I see file.md exists and matches the text in file.
I'll convert file.md similarly. Let's look at the file text documentation:
file
```text
Title
1. Command
1.10.0 Options
---------------------------------------------
Command
1.10.0
Info on the commands' options.
```
OK, after analyzing the guide file, I've updated file.md to:
file.md
```markdown
# Title
### [1. Command](#command)
- [1.10.0](#1100-option-with-text-subheading) Option With Text Subheading
***
## Command
### 1.10.0 Option With Text Subheading
Info on the commands' options.
```/convert-plaintext-to-md #file.md --guide #CODE.md我发现该文件和CODE Markdown文件都有对应的纯文本文档。我将查看CODE文件并与CODE.md进行对比,识别转换模式以辅助转换。
CODE
```text
Title
Text in opening.
1. Section
1.1 Section Item
=============================================
1. Section
1.1
Full details of section item.
```
再看CODE.md:
CODE.md
```markdown
# Title
Text in opening.
### [Section](#1-section)
- [1.1](#11) Section Item but Only Numbers in Sub-heading
***
## 1. Section
### 1.1
Full details of section item.
```
我发现file.md已存在,且内容与file文件中的文本一致。
我将以类似的方式转换file.md。让我们查看file纯文本文档的内容:
file
```text
Title
1. Command
1.10.0 Options
---------------------------------------------
Command
1.10.0
Info on the commands' options.
```
好的,分析完指南文件后,我已将file.md更新为:
file.md
```markdown
# Title
### [1. Command](#command)
- [1.10.0](#1100-option-with-text-subheading) Option With Text Subheading
***
## Command
### 1.10.0 Option With Text Subheading
Info on the commands' options.
```/convert-plaintext-to-md #file.md polish the converted markdown fileI'll finalize file.md. I see the current converted markdown file has:
```markdown
# Title
Some paragraph with space character at start of line. This <html> should be escaped.
- Some list item with extra space character.
- Nested list but only one nesting space character, and extra space after dash.
if (a == 1) {
return "Indented code block without enough space characters.";
} else {
return "Passing `finalize` or similar should resolve this.";
}
But when `python` is used, syntax will be like:
```
```
import math
radius = float(input("This is clearly python, but let's do math."))
area = math.pi * radius**2
circumference = 2 * math.pi * radius
print(f"Area: {area:.2f}, Circumference: {circumference:.2f}")
```
Let me trim a few things:
```markdown
# Title
Some paragraph with space character at start of line. This \<html\> should be escaped.
- Some list item with extra space character.
- Nested list but only one space character.
if (a == 1) {
return "Indented code block without enough space characters.";
} else {
return "Passing `finalize` or similar should resolve this.";
}
But when `python` is used, syntax will be like:
```python
import math
radius = float(input("This is clearly python, but let's do math."))
area = math.pi * radius**2
circumference = 2 * math.pi * radius
print(f"Area: {area:.2f}, Circumference: {circumference:.2f}")
```/convert-plaintext-to-md #file.md polish the converted markdown file我将对file.md进行最终优化。我看到当前已转换的Markdown文件内容如下:
```markdown
# Title
Some paragraph with space character at start of line. This <html> should be escaped.
- Some list item with extra space character.
- Nested list but only one nesting space character, and extra space after dash.
if (a == 1) {
return "Indented code block without enough space characters.";
} else {
return "Passing `finalize` or similar should resolve this.";
}
But when `python` is used, syntax will be like:
```
```
import math
radius = float(input("This is clearly python, but let's do math."))
area = math.pi * radius**2
circumference = 2 * math.pi * radius
print(f"Area: {area:.2f}, Circumference: {circumference:.2f}")
```
我将进行一些修剪:
```markdown
# Title
Some paragraph with space character at start of line. This \<html\> should be escaped.
- Some list item with extra space character.
- Nested list but only one space character.
if (a == 1) {
return "Indented code block without enough space characters.";
} else {
return "Passing `finalize` or similar should resolve this.";
}
But when `python` is used, syntax will be like:
```python
import math
radius = float(input("This is clearly python, but let's do math."))
area = math.pi * radius**2
circumference = 2 * math.pi * radius
print(f"Area: {area:.2f}, Circumference: {circumference:.2f}")
```/convert-plaintext-to-md #BUGS --p "regex()=> ^ {1,}([0-9]+\.[0-9]+\.[0-9]+) to ^### $1"I see that there is no `BUGS.md` file. Let me copy the current plaintext BUGS documentation:
```bash
copy BUGS BUGS.md
```
Now I'll update the copied file BUGS.md, converting it to proper markdown.
Let me read the current contents:
```markdown
1 Section
1.1 Section Item
1.2 Section Item
...
1.12 Section Item
```
OK, I've matched the shorthand regular expression pattern and updated the BUGS.md to:
```markdown
1 Section
### 1.1 Section Item
### 1.2 Section Item
### ...
### 1.12 Section Item
```/convert-plaintext-to-md #BUGS --p "regex()=> ^ {1,}([0-9]+\.[0-9]+\.[0-9]+) to ^### $1"我发现不存在`BUGS.md`文件。我将复制当前的纯文本BUGS文档:
```bash
copy BUGS BUGS.md
```
现在我将更新复制后的BUGS.md文件,将其转换为规范的Markdown格式。
让我查看当前内容:
```markdown
1 Section
1.1 Section Item
1.2 Section Item
...
1.12 Section Item
```
好的,我已匹配简写正则表达式模式,并将BUGS.md更新为:
```markdown
1 Section
### 1.1 Section Item
### 1.2 Section Item
### ...
### 1.12 Section Item
```exit()exitexit()killkillallquitquit()sleepsleep()[!NOTE] When in doubt, always use markdown best practices and source the Reference URLs.
exit()exitexit()killkillallquitquit()sleepsleep()[!NOTE] 如有疑问,请始终遵循Markdown最佳实践,并参考参考部分的URL。
[!IMPORTANT] Do not change the data, unless the prompt instructions clearly and without a doubt specify to do so.
[!IMPORTANT] 除非提示说明明确且无歧义地指定,否则请勿修改数据。