TA的每日心情 | 慵懒 2023-3-27 00:18 |
---|
签到天数: 606 天 [LV.9]以坛为家II
|
楼主 |
发表于 2020-7-6 13:13:54
|
显示全部楼层
本帖最后由 preachers 于 2020-7-6 13:18 编辑
) J! T: W; h9 a$ h/ K. E0 wVimVim 发表于 2020-7-5 19:58
1 }) T# Q+ @; c6 D7 U& ^join-styles: no; e& p1 d% j, t& [, x5 t
: s: F& t- s( R/ ^
tidy的配置很灵活的,你的所有问题都有答案。 3 X) V& J. B# I2 w
恩,我把tidy的配置说明基本看了一遍,把配置文件已经改成这样了
0 u, p0 B! a2 u# u8 K% L( S% X. \- //Document Display Options6 |* A2 j, [+ t# E# G
- gnu-emacs: no
: B6 s3 @; r) e* p# { ? - markup: yes8 C* t0 J. N* @' v) C; |& T, d
- mute:
3 R4 p2 }: t8 A" ]! e4 G5 T8 ? - mute-id: no( |% A2 p$ I- n8 h- S/ X0 U
- quiet: yes. i6 c0 e+ I; a) G; w
- show-body-only: yes3 z/ j1 t9 O" ~8 S: B7 u
- show-errors: 6
& Y3 g" }1 }8 z# ^ - show-info: yes( D5 t" w o0 a0 `
- show-warnings: yes
5 G& Z( K6 H' Y% F+ U( A - 6 s! @, ]! v' J! b: e
- //Document In and Out Options
$ G, c1 H7 `0 [ - add-meta-charset: no
! [, |5 b1 I$ }* u8 H - add-xml-decl: no
+ S0 `* K; o% k - add-xml-space: no8 x+ ?" _& a8 B9 C& Y
- doctype: auto% V7 _) o( d, t: c7 G8 N6 X P O9 R
- input-xml: no& P9 f( o% x0 C# O; f
- output-html: no
+ u& q! ]( P7 _$ `: ]- q - output-xhtml: yes
# f9 f+ d" d& q0 K7 C/ |, `; v - output-xml: no+ Z, C; n; m; d9 ]# z, d
- : X% I7 k( R4 |$ ?, R
- //File Input-Output Options8 U0 s2 J7 n3 Y5 C+ [; c
- error-file:) O U7 Z1 M0 d. g
- keep-time: no
& {8 e* Z2 p V; ] - output-file: i9 m5 F' Y; e! t9 p3 ^0 \ M
- write-back: no/ Q; @9 b; G# g! {3 C3 U3 o
+ Z! \: { l5 h0 U _- //Diagnostics Options Reference
9 u( h/ D J _ X; i - accessibility-check: 0
e5 f* L; c I4 r8 {' o - force-output: no8 m' v! u$ q$ S8 F4 c) \* @
- show-meta-change: no
1 f8 X, |5 L# M' }/ |1 l - warn-proprietary-attributes: yes$ R$ B C r! Y7 j# t
/ I# U! K% i* J9 j2 m8 _- //Encoding Options Reference# F3 F4 }! U) A% j' V% Z& }5 }0 {, R B
- char-encoding: utf8
1 a7 I% H4 R3 B2 u - input-encoding: utf8
& x- W4 j# ?- W6 J4 a - newline: CRLF
1 @5 |& k# v: {) R: e6 J! b - output-bom: auto
/ K! d. A2 g/ k. |! @4 w1 Q9 z1 C8 W6 ^ - output-encoding: utf8
$ v! [" P0 j1 T: Z/ d D2 d" f( K - * V" Y/ f7 a% q5 B" {, l6 U6 h2 s
- //Cleanup Options Reference; d& D, ?( A' }! m0 X$ ^2 G
- bare: no+ b6 c1 [7 S9 I4 y) v' J. a! L
- clean: no
, _5 y; i' Z }) O# A# \- u |1 s - drop-empty-elements: no; Z# l& L; n0 O; d7 e+ a7 o" x
- drop-empty-paras: no0 q; }2 G5 @' e0 ?, x; ~/ p
- drop-proprietary-attributes: no8 |: ~0 O) N; B& _5 o
- gdoc: no
^7 R8 {( b0 m( R* A" `8 k - logical-emphasis: no; q2 w! m( y- [1 d0 P+ \7 ? x
- merge-divs: no
% @2 ?3 _( \- ?* I8 D- d - merge-spans: no% d- N# X3 ^- ~' b; N9 M6 L# t# ]
- word-2000: no
) g- T8 x4 F$ S - ( S# e6 `, g' }2 |
- //Entities Options Reference. D- F+ d3 c# N1 G8 H5 G
- ascii-chars: no- p& \8 x" C9 G" U9 N6 Q
- ncr: yes! j& Y% b2 a# M: D# s
- numeric-entities: no
* f+ }" ^8 P& H3 z9 b4 Q$ r - preserve-entities: no& Q& A, L9 e( L
- quote-ampersand: no
1 ?# a: ]4 @, h- O4 ` - quote-marks: no$ m( d. Y3 C* M" r
- quote-nbsp: yes# H; j8 T8 R+ Q3 s
- ! w/ k6 j5 F- F8 q- o
- //Repair Options Reference( y9 [0 n W/ j' E) c5 X+ G
- alt-text:
( q$ Z3 w' r' Q# c( L - anchor-as-name: no/ Y. T5 B1 Y* F( M/ p1 |& r
- assume-xml-procins: no
' t- \& \& |+ f n1 h% K - coerce-endtags: no" E+ L6 r% n- I. |$ n6 z
- css-prefix: c+ B" x' d, Q, D" j) }
- custom-tags: no
+ S- w7 v9 I2 x" i7 N - enclose-block-text: no% N1 c. C+ L5 Y& D: j5 e
- enclose-text: no
! g; @) J; L. s* L& H - escape-scripts: no
& R' Q4 n9 f$ e( @, Y2 R% c Q - fix-backslash: no
. P8 j% o6 m5 z/ U* ^4 T) J* x$ | - fix-bad-comments: auto
& k, ]5 I% \& N6 O ~ - fix-style-tags: no
8 \6 }; t- n# g - fix-uri: no
4 a, b6 S3 a2 e6 P+ F - literal-attributes: no) {5 ]& f" F2 V) d; y- } g% H
- lower-literals: no
3 Q$ n" O( }2 U3 ] x9 j8 | - repeated-attributes: keep-last+ w# u. z- G7 Y9 n' L
- skip-nested: no
( {, M+ x2 F- \4 s% Q - strict-tags-attributes: no
7 v; ? n: `) m* n8 P2 D u" c - uppercase-attributes: no
) ~; g9 {1 i3 Y! u - uppercase-tags: no
. s+ u* f4 G& X, u/ q, m - 0 V1 P8 J- Q8 W+ Q+ C) ]7 |
- //Transformation Options Reference
8 K# m4 z n. a - decorate-inferred-ul: no
" @8 X* m: D( N1 N) W( q - escape-cdata: no
+ n4 u- Y; `. D) Q5 l - hide-comments: no1 V1 S1 u: j+ r( e4 U
- join-classes: no9 ~2 X4 I& P3 U8 O' [, G; _
- join-styles: no
3 O9 H; D" X7 L; G# s5 Q9 _; i+ ^ - merge-emphasis: no5 Q" O: I3 _. |$ U6 A- _! Z
- replace-color: no
8 Z5 ?! Q; v1 s; Z0 I
, N5 ~' r& l1 [ n. h- //Teaching Tidy Options Reference
+ k0 c; F' V7 E, H( M3 o - new-blocklevel-tags: keyword
1 a& @% o+ A! E - new-empty-tags: mdx
$ Z, J8 z1 R4 _3 Q) M - new-inline-tags:8 q& ~: x9 y2 D8 X7 o0 M
- new-pre-tags:
" Y+ ~. L# ]8 S - ! t+ L6 U0 G0 z5 `& @1 a
- //Pretty Print Options Reference: d. ], q) Q b. L( x! e) D
- break-before-br: no7 I/ H& U3 l) R
- indent: no
3 I/ i& ]$ ^3 S \" ]9 Z - indent-attributes: no
8 \7 t! Q7 V% Y k6 C, U' F - indent-cdata: no
1 }2 w# e1 J, R4 s E - indent-spaces: 4
* ~' p6 }8 y* ^ C! n' n' @ - indent-with-tabs: no
3 z/ }* \5 x/ [% I0 s3 u - keep-tabs: no
5 _ ~$ i6 T5 t6 j; Y - tab-size: 49 \! x9 |! c, S; d
- omit-optional-tags: no
- Z/ r) W- G( i - priority-attributes:
+ i- P; |, Z* M' T3 R - sort-attributes: none
- z9 ?" [/ O$ { - punctuation-wrap: no
8 X3 R6 V: v! r3 z1 V' h6 ], b& _ - tidy-mark: no
: `" v6 A3 H1 e: f! k3 s - vertical-space: no
$ n, p; e; T9 m" Q - wrap: 0
* }% `0 v9 C3 c - wrap-asp: no
! A1 a9 A4 ^' V' ~6 E g4 b - wrap-attributes: no$ Q4 s% y# W4 _/ H6 P; F8 i
- wrap-jste: no. O- h- {! \% z( I! }- W
- wrap-php: no8 Y! C; v& X" Z4 d, l$ p, i$ F0 V
- wrap-script-literals: no
& w+ c6 U) `7 W- b f/ i" l# D! } - wrap-sections: no
复制代码
. y, G: ~8 {& L3 ?2 z0 d
5 {' Z8 L/ Z( F" Y c! y) R- F S基本上能变成no的全变成no了。之前去掉的一些标签确实得以保留,但是最崩溃的还是它把行数分成那么多,这个我找遍配置参数也没找到能改变这个的。
! p4 D8 o+ H1 g: [0 X) [* l虽然这个换行的问题其实可以在处理之后用正则再替换回来,但是很麻烦,如果我想保留词典源文件本来的换行规则的话几乎是不可能的,我只能选择把每个词条都变成一整行,所以如果tidy本身能设置成保留原来的格式是最好的。
. U* y" h* J8 [6 c! ?/ O5 J) p; v( F# n) D, e8 S: l% N
|
|