当前位置:网站首页>TS:typora代码片段缩进显示异常(已解决)-2022.7.24
TS:typora代码片段缩进显示异常(已解决)-2022.7.24
2022-07-25 21:59:00 【一念一生~one】

目录
1、问题现象
typora里的代码片段缩进和linux里面的缩进为什么显示不一样呢?
- typora里的代码片段缩进如下:
按理说yaml里的代码都是缩进2个的,但是这里显示的好奇怪呀,有的是缩进2个,有的不是……
# vm-node-exporter.yaml
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: node-exporter
namespace: kube-vm
spec:
selector:
matchLabels:
app: node-exporter
template:
metadata:
labels:
app: node-exporter
spec:
hostPID: true
hostIPC: true
hostNetwork: true #注意这里是hostNetwork方式
nodeSelector:
kubernetes.io/os: linux
containers:
- name: node-exporter
image: prom/node-exporter:v1.3.1
args:
- --web.listen-address=$(HOSTIP):9111 #这里修改监听端口为9111
- --path.procfs=/host/proc
- --path.sysfs=/host/sys
- --path.rootfs=/host/root
- --no-collector.hwmon # 禁用不需要的一些采集器
- --no-collector.nfs
- --no-collector.nfsd
- --no-collector.nvme
- --no-collector.dmi
- --no-collector.arp
- --collector.filesystem.ignored-mount-points=^/(dev|proc|sys|var/lib/containerd/.+|/var/lib/docker/.+|var/lib/kubelet/pods/.+)($|/)
- --collector.filesystem.ignored-fs-types=^(autofs|binfmt_misc|cgroup|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|mqueue|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|sysfs|tracefs)$
ports:
- containerPort: 9111
env:
- name: HOSTIP
valueFrom:
fieldRef:
fieldPath: status.hostIP
resources:
requests:
cpu: 150m
memory: 180Mi
limits:
cpu: 150m
memory: 180Mi
securityContext:
runAsNonRoot: true
runAsUser: 65534
volumeMounts:
- name: proc
mountPath: /host/proc
- name: sys
mountPath: /host/sys
- name: root
mountPath: /host/root
mountPropagation: HostToContainer
readOnly: true
tolerations: # 添加容忍
- operator: "Exists"
volumes:
- name: proc
hostPath:
path: /proc
- name: dev
hostPath:
path: /dev
- name: sys
hostPath:
path: /sys
- name: root
hostPath:
path: /


通过空格选中也是2个字符,没错的。
是因为这里的字体问题吗??……
- 但是当把typora里的代码粘贴到linux里后,发现一切都正常:
都是很明显地缩进2个的:

- 将typora里的代码粘贴到sublime text里也是正常缩进2个的:

- 额额,果然是和主题的字体设置有关:
我这里将typora主题换回到了默认github后,此时,缩进都显示正常了。

- 当前typora配置如下


2、解决办法
- 此时,修改当前的主题的字体


3、验证效果
- 效果如下

再次拷贝代码到sublime text3观察效果:

符合预期,以上问题已解决。
关于我
我的博客主旨:
- 排版美观,语言精炼;
- 文档即手册,步骤明细,拒绝埋坑,提供源码;
- 本人实战文档都是亲测成功的,各位小伙伴在实际操作过程中如有什么疑问,可随时联系本人帮您解决问题,让我们一起进步!
微信二维码
x2675263825 (舍得), qq:2675263825。

微信公众号
《云原生架构师实战》

csdn
https://blog.csdn.net/weixin_39246554?spm=1010.2135.3001.5421

博客
www.onlyyou520.com

知乎
https://www.zhihu.com/people/foryouone

语雀
https://www.yuque.com/books/share/34a34d43-b80d-47f7-972e-24a888a8fc5e?# 《云笔记最佳实践》


最后
好了,关于本次就到这里了,感谢大家阅读,最后祝大家生活快乐,每天都过的有意义哦,我们下期见!

边栏推荐
- 在腾讯干软件测试3年,7月无情被辞,想给划水的兄弟提个醒...
- Three ways to allocate disk space
- ansible+Crontab批部署巡检
- 狗粮的成分
- PE format: analyze and implement IATHOOK
- jenkins+SVN配置
- Animation curves are used every day. Can you make one by yourself? After reading this article, you will!
- 【汇编语言01】基础知识
- At present, flynk CDC does not support mysql5.5. If you change the source code and release this restriction, there will be a lot of data problems?
- JMeter websocket interface test
猜你喜欢
![[hand tear STL] BitSet (bitmap), bloom filter](/img/bc/a6e3c2ccce478460a2742852eee9cf.png)
[hand tear STL] BitSet (bitmap), bloom filter

【Flink】FLink RocksDBListState 报错 You cannot add null to a ListState

这次龙蜥展区玩的新花样,看看是谁的 DNA 动了?

在腾讯干软件测试3年,7月无情被辞,想给划水的兄弟提个醒...

Jmeter--- set proxy recording request
![[Flink] flick rocksdbliststate reports an error you cannot add null to a liststate](/img/c0/1923e17f166ab4bc7d20f48398f366.jpg)
[Flink] flick rocksdbliststate reports an error you cannot add null to a liststate
![[MAIXPY]kpu: load error:2005, ERR_READ_FILE: read file failed问题解决](/img/0b/da67b5a361a2cdfaf81568d34cf5f7.png)
[MAIXPY]kpu: load error:2005, ERR_READ_FILE: read file failed问题解决

Ijcai2022 meeting! Microsoft and other tutorials on domain generalization

【饭谈】如何设计好一款测试平台?

成为比开发硬气的测试人,我都经历了什么?
随机推荐
【饭谈】如何设计好一款测试平台?
JS timer and swiper plug-in
Basic knowledge in the project
6-18漏洞利用-后门连接
Redis master-slave architecture lock failure problem (master-slave)
立创EDA——我为什么要学EDA
Share | intelligent fire emergency management platform solution (PDF attached)
【饭谈】测试平台为什么有组件化?模块化?很多看不到的地方设计的很好是种浪费么?
Excuse me, how to deal with repeated consumption of MySQL data
关于接口测试你想知道的都在这儿了
Lichuang EDA -- creation of devices 01 resistance (II)
The file cannot be saved (what if the folder is damaged and cannot be read)
Redis内存淘汰机制?
Animation curves are used every day. Can you make one by yourself? After reading this article, you will!
开户就可以购买收益在百分之六以上的理财产品了吗
The technical aspects of ByteDance are all over, but the result is still brushed. Ask HR why...
I/o case practice
Children's programming electronic society graphical programming level examination scratch level 1 real problem analysis (judgment question) June 2022
[Fantan] how to design a test platform?
面了个腾讯三年经验的测试员,让我见识到了真正的测试天花板