Skip to content

Commit 7ad6306

Browse files
committed
update version & fixed punctuation counting as a word
1 parent c3636d5 commit 7ad6306

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "window-reader",
3-
"version": "1.2.2",
3+
"version": "1.2.3",
44
"scripts": {
55
"dev": "tauri dev",
66
"build": "tauri build"

src-tauri/Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "window_reader"
3-
version = "1.2.2"
3+
version = "1.2.3"
44
description = "A transparent notepad-like app"
55
authors = ["Ripwords"]
66
license = ""

src-tauri/tauri.conf.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"package": {
33
"productName": "window-reader",
4-
"version": "1.2.2"
4+
"version": "1.2.3"
55
},
66
"build": {
77
"distDir": "../dist",

src/components/Content.vue

+5-2
Original file line numberDiff line numberDiff line change
@@ -108,18 +108,19 @@ watch(() => store.content.ops.ops, () => {
108108
}
109109
}
110110
})
111+
const specialCharacters = ['`', '~', '<', '>', '+', '-', '=', '|', '\\', '/', '*', '@', '#', '$', '%', '^', '&', '!', '?', ';', ':', '.', ',', ' ']
111112
arr.forEach((arrItem: any) => {
112113
arrItem.forEach((item: any) => {
113114
const words = item.split(" ")
114115
words.forEach((word: any) => {
115116
if(word.split("\n").length > 1) {
116117
const subWords = word.split("\n")
117118
subWords.forEach((subWord: any) => {
118-
if(subWord.length > 0) {
119+
if(subWord.length > 0 && !specialCharacters.includes(subWord)) {
119120
count++
120121
}
121122
})
122-
} else if(word.length > 0) {
123+
} else if(word.length > 0 && !specialCharacters.includes(word)) {
123124
count++
124125
}
125126
})
@@ -145,6 +146,8 @@ appWindow.listen("tauri://close-requested", async () => {
145146
})
146147
147148
await shortcutRegister()
149+
150+
// TODO Fix word count placement, when scrolling it is stuck in an awkward position
148151
</script>
149152

150153
<template>

0 commit comments

Comments
 (0)