File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import {
1010 getWordCount ,
1111 getCitationCount ,
1212 getFootnoteCount ,
13+ cleanComments ,
1314} from "../utils/StatUtils" ;
1415
1516export default class StatsManager {
@@ -108,6 +109,9 @@ export default class StatsManager {
108109 }
109110
110111 public async change ( text : string ) {
112+ if ( this . plugin . settings . countComments ) {
113+ text = cleanComments ( text ) ;
114+ }
111115 const fileName = this . workspace . getActiveFile ( ) . path ;
112116 const currentWords = getWordCount ( text ) ;
113117 const currentCharacters = getCharacterCount ( text ) ;
Original file line number Diff line number Diff line change 77 getCitationCount ,
88 getFootnoteCount ,
99 getPageCount ,
10+ cleanComments ,
1011} from "src/utils/StatUtils" ;
1112import { debounce } from "obsidian" ;
1213
@@ -25,7 +26,7 @@ export default class StatusBar {
2526 ) ;
2627
2728 this . statusBarEl . classList . add ( "mod-clickable" ) ;
28- this . statusBarEl . setAttribute ( "aria-label" , "Coming Soon " ) ;
29+ this . statusBarEl . setAttribute ( "aria-label" , "!!! " ) ;
2930 this . statusBarEl . setAttribute ( "aria-label-position" , "top" ) ;
3031 this . statusBarEl . addEventListener ( "click" , ( ev : MouseEvent ) =>
3132 this . onClick ( ev )
@@ -44,6 +45,10 @@ export default class StatusBar {
4445 const sb = this . plugin . settings . statusBar ;
4546 let display = "" ;
4647
48+ if ( ! this . plugin . settings . countComments ) {
49+ text = cleanComments ( text ) ;
50+ }
51+
4752 for ( let i = 0 ; i < sb . length ; i ++ ) {
4853 const sbItem = sb [ i ] ;
4954
You can’t perform that action at this time.
0 commit comments