![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
Spell Check and Change Case question/issue?
Question as to the way Change Case works
#1. Selected all lower case text between tags and applied each of the 5 possible operations and that seems to work as expected #2. Selected mixEDcaSE words between tags and the 5 operations only seem to catch some of the selected text #3. Selected all lower case text but INCLUDING the tags and applied each of the 5 possible operations and it seems that the tags are included in the operation. I.e. uppercasing <p>cat</p> gives <P>CAT</P>. Spoiler:
Last edited by phossler; 11-29-2014 at 10:26 AM. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
If you want the operation to apply to only parts of the matched text, surround those parts by brackets in your find expression. See the example in the manual.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
Sorry -- I wasn't very clear.
I select text and then right-click to use the Change Case menu. It has the 5 operations that I tried Doing it that way, I don't think I would have a Find expression I really did look in the manual for using Change Case, but didn't see it |
![]() |
![]() |
![]() |
#4 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Then if you dont want it to apply to the content in tags, dont select the tags. It will apply to whatever you have selected.
|
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
1. I just figured that tags would by bypassed.
2. The real issue seems to be that if the text is mixed case (start) after operations like Upper Case the text is not all upper case like I would expect (end) Code:
<body> <p> start with 'aaaa bbbb CCCC dddd eeeEEE FFFfff'</p> <p> end with after UPPER CASE 'AAAA bbbb CCCC dddd eeeEEE FFFfff xxxx'</p> </body> Last edited by phossler; 11-28-2014 at 10:44 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I cannot replace that, selecting mixed case text makes it all uppercase. Note that when you right click the editor might automatically adjust your selection, look at what is selected when the right click menu pops up
|
![]() |
![]() |
![]() |
#7 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
Change Case and Spell Check
You are right -- the editor seems to be adjusting my selected text based on the fact that the second case below seems to be in mixed case
In both cases I selected the text with the mouse from right to left In the first the "nice text in one case" remained selected after a right click In the second only the "aaaa" remained selected after a right click Original -- Code:
<body> <p>original = nice text in one case</p> <p>after = nice text in one case</p> <p>original = aaaa bbbb CCCC dddd eeeEEE FFFfff</p> <p>after = aaaa bbbb CCCC dddd eeeEEE FFFfff</p> </body> After UPPER CASE Code:
<body> <p>original = nice text in one case</p> <p>after = NICE TEXT IN ONE CASE</p> <p>original = aaaa bbbb CCCC dddd eeeEEE FFFfff</p> <p>after = AAAA bbbb CCCC dddd eeeEEE FFFfff</p> </body> Last edited by phossler; 11-29-2014 at 10:25 AM. Reason: Did some more testing |
![]() |
![]() |
![]() |
#8 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
Update -- what seems to make the difference for the editor adjusting the selection is the right-click spell checking kicking for the nonsense text I was using to test. If I use ALL real words in mixed case ...
Code:
<p>original = cat doG bird hoUSE Car boat TRAIN</p> <p>after = CAT DOG BIRD HOUSE CAR BOAT TRAIN</p> But what was/is confusing me was the sensitivity of the editor's changing the selection depending on the cursor position after selecting the test. Below when I selected the text between the tags, and right click on a real word (e.g. doG) all text remains selected and no spell check correction pops up and Change Case happens as expected. However if I select a word not in the dictionary (even though it should be ![]() Code:
<p>after = cat doG bird hoUSE Car boat TRAIN KovidGoyalIsGREAT</p> |
![]() |
![]() |
![]() |
#9 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Simply right click outside the selection and it will not be auto-adjusted at all. The selection is auto-adjusted only when the cursor is in a word marked as being misspelled, this allows for simple replacement of misspelled words by right clicking on them.
Last edited by kovidgoyal; 11-29-2014 at 11:31 AM. |
![]() |
![]() |
![]() |
#10 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
Boy, am I embarrassed
Never occurred to me to select the text and not right click in the selection |
![]() |
![]() |
![]() |
#11 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Nonetheless, I have changed the editor to not alter the current selection when right-clicking on a mis-spelled word. Simple replace of the mis-spelled word will still work, but people will not be confused by the changed selection.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
KB Shortcuts for Change Case? | phossler | Editor | 12 | 08-15-2014 05:20 AM |
Change case tool | ZoeRochelle | Editor | 12 | 04-04-2014 06:55 PM |
Language change issue | Shivam | Sony Reader Dev Corner | 1 | 12-26-2012 04:34 PM |
Troubleshooting New Kindle Non-Touch - Case Issue? | apaximander | Amazon Kindle | 3 | 01-31-2012 03:14 PM |
Folder case change | skells | Calibre | 3 | 05-17-2011 02:24 PM |