当前位置:网站首页>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?# 《云笔记最佳实践》


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

边栏推荐
- 别投了,软件测试岗位饱和了...
- 立创EDA——器件的创建01-电阻(二)
- What are the application characteristics of NTU general database gbase Bi?
- [fan Tan] those stories that seem to be thinking of the company but are actually very selfish (I: building wheels)
- Bitcoin.com:USDD代表了真正去中心化稳定币
- Jmeter---设置代理录制请求
- I/O案例实操
- mouseEvent事件——mouse坐标描述——focus事件——input事件——节流(thorttle)——mouseWheel(滚轮事件)
- C language left value and right value description [easy to understand]
- 在进行自动化测试,遇到验证码的问题,怎么办?
猜你喜欢
![[go basics 02] the first procedure](/img/af/f32762a828f384bf6aa063ebf959aa.png)
[go basics 02] the first procedure
![[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问题解决

8000 word super detailed custom structure type

Basic knowledge in the project
![[leetcode ladder] linked list · 876 find the middle node of the linked list](/img/72/d3e46a820796a48b458cd2d0a18f8f.png)
[leetcode ladder] linked list · 876 find the middle node of the linked list

Shopify sellers: share some tips for social media marketing!
![[leetcode ladder] linked list · 021 merge two ordered linked lists](/img/72/d3e46a820796a48b458cd2d0a18f8f.png)
[leetcode ladder] linked list · 021 merge two ordered linked lists

PE format: analyze and implement IATHOOK

jenkins+SVN配置

手机端微信发朋友圈功能测试点总结
随机推荐
开户就可以购买收益在百分之六以上的理财产品了吗
Virtual memory and disk
少儿编程 电子学会图形化编程等级考试Scratch一级真题解析(判断题)2022年6月
开源的RSS订阅器FreshRSS
立创EDA——器件的创建01-电阻(二)
Simple use of protobuf
mouseEvent事件——mouse坐标描述——focus事件——input事件——节流(thorttle)——mouseWheel(滚轮事件)
Dovecot set mailbox quota
动画曲线天天用,你能自己整一个吗?看完这篇你就会了!
Jmeter--- set proxy recording request
再次来光顾
Collation of SQL statement exercises
[Fantan] how to design a test platform?
狗粮的成分
GPON introduction and Huawei OLT gateway registration and configuration process
[51Nod1676 无向图同构]无向图哈希[通俗易懂]
Redis内存淘汰机制?
[51nod1676 undirected graph isomorphism] undirected graph hash [easy to understand]
jsp九大内置对象
Basic knowledge in the project