Skip to content

Commit

Permalink
Merge pull request #831 from calmwaves111/regex-mark-example
Browse files Browse the repository at this point in the history
Regex mark example 插件使用技巧,破折号作者自动右对齐
  • Loading branch information
juestchaos authored Aug 3, 2024
2 parents 469e1b4 + 7356617 commit 0932893
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions 10-Obsidian/Obsidian使用技巧/Obsidian使用技巧.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ modified: 20240408191220
- [[【外观】分享一种好看的月历做法]]
- [[【快捷键】使用连续按键来快速打开页面]]
- [[【实用技巧】实现OB内的文本指令]]
- [[破折号作者自动右对齐]]
- Quickadd
- [[Quickadd结合CSS实现挖空复习]] by Mon
- [[QuickAdd脚本-为深浅模式配置不同的主题]]
Expand Down
41 changes: 41 additions & 0 deletions 10-Obsidian/Obsidian使用技巧/破折号作者自动右对齐
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插件的几种使用场景]]

0 comments on commit 0932893

Please sign in to comment.