我无法将GFM highlighted code block转换为Stack Overflow highlighted code block。
例如,我需要转换:
Do not change this line
```markdown
Sasha great!
Sasha nice!
She is beautiful, surprise!
```
Do not change this line
为:
Do not change this line
<!-- language: lang-markdown -->
Sasha great!
Sasha nice!
She is beautiful, surprise!
Do not change this line
得到突出显示的代码块,我需要在代码块内的每一行的开头添加制表符。我不明白,我怎么做。
我的示例正则表达式:
查找:
\`\`\`(.+?)\n((.+?\n)+)\`\`\`
替换:
<!-- language: lang-\1 -->\n\n\t\2
我得到结果:
Do not change this line
<!-- language: lang-markdown -->
Sasha great!
Sasha nice!
She is beautiful, surprise!
Do not change this line
仅在代码块内的第一行开头添加制表符号。我该怎么做,在代码块内的每一行的开头添加制表符号?