File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4343
4444## Syntax
4545
46+ ### ` :sic ` (inline)
47+
48+ ``` markdown
49+ > It’s true taht : sic { } they said
50+ ```
51+
52+ ### ` :ellipsis ` (inline)
53+
54+ ``` markdown
55+ > We were told it’s very : ellipsis { } good for the soul
56+ ```
57+
4658### ` :ins ` (inline, insertions)
4759
4860``` markdown
Original file line number Diff line number Diff line change @@ -45,6 +45,37 @@ export function editingPlugin(options: Partial<Options>) {
4545 visit ( tree , { type : "textDirective" , name : "ins" } , ( node : Directive ) => {
4646 changeName ( node , "ins" , [ "inline" ] ) ;
4747 } ) ;
48+ visit ( tree , { type : "textDirective" , name : "sic" } , sicVisitor ) ;
49+ visit ( tree , { type : "textDirective" , name : "ellipsis" } , ellipsisVisitor ) ;
50+ }
51+
52+ function ellipsisVisitor ( node : Parent ) {
53+ node . data = {
54+ ...node . data ,
55+ hName : "ins" ,
56+ hProperties : { class : "editorial" } ,
57+ hChildren : [ { type : "text" , value : "[…]" } ] ,
58+ } ;
59+ }
60+
61+ function sicVisitor ( node : Parent ) {
62+ node . data = {
63+ ...node . data ,
64+ hName : "ins" ,
65+ hProperties : { class : "editorial" } ,
66+ hChildren : [
67+ {
68+ type : "element" ,
69+ tagName : "abbr" ,
70+ hName : "abbr" ,
71+ properties : {
72+ class : "sic" ,
73+ title : "Spelling Is Correct" ,
74+ } ,
75+ children : [ { type : "text" , value : "[sic]" } ] ,
76+ } ,
77+ ] ,
78+ } ;
4879 }
4980}
5081
You can’t perform that action at this time.
0 commit comments