-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #831 from calmwaves111/regex-mark-example
Regex mark example 插件使用技巧,破折号作者自动右对齐
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
uid: 20240802110549 | ||
title: 破折号作者自动右对齐 | ||
tags: [CSS自定义] | ||
description: 破折号作者自动右对齐 | ||
author: calmwaves | ||
type: awesome | ||
draft: false | ||
editable: false | ||
modified: 20240802111503 | ||
--- | ||
|
||
# 破折号作者自动右对齐 | ||
|
||
效果预览:左边是源文本,右边是在 obsidian 中的显示效果,破折号及其之后的内容自动右对齐 | ||
|
||
![](https://cdn.pkmer.cn/images/20240802110947.png!pkmer) | ||
|
||
安装 [[regex-mark]] 插件,按如下配置 `——.*`,`dashright` | ||
|
||
![](https://cdn.pkmer.cn/images/20240802111252.png!pkmer) | ||
|
||
添加 css | ||
|
||
```css | ||
/* !——破折号开头的内容右对齐 */ | ||
div.cm-line span.dashright { | ||
display:flex; | ||
justify-content: right; | ||
} | ||
.markdown-source-view.mod-cm6 img.cm-widgetBuffer{ | ||
display: none!important; | ||
} | ||
|
||
.markdown-preview-view span.dashright { | ||
display:flex; | ||
justify-content: right; | ||
} | ||
``` | ||
|
||
(待完善,regex-mark 插件教程和使用示例,可先学习 [[Dynamic-Highlights插件的几种使用场景]] |