View Single Post
Old 10-26-2016, 11:30 AM   #21
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,736
Karma: 24031401
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by DiapDealer View Post
My second suggestion may still work--depending on how/where the BookID is generated. Otherwise, it may come down to checking the first character and regenerating a uuid until one that starts with a valid character is generated. I'm not crazy about that idea.
I haven't looked at the code, but there appear to be two different id generation methods.

1. If the user presses CTRL+ENTER a random uiid is used as the id for the second file.
2. If the user inserts a split marker with CTRL+SHIFT+ENTER and selects Split At Markers, the id of the next file will be Section0001_0001.xhtml, Section0001_0002.xhtml etc.

Would it be possible to re-use the id generation code from the Split At Markers code for Split At Cursor or would that cause all kinds of other problems?
Doitsu is offline   Reply With Quote