Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hot-Fix Pasting Ket files with unicode: failure #1793

Merged
merged 1 commit into from
Oct 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions packages/ketcher-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ketcher-core",
"version": "2.6.0-rc.2",
"version": "2.6.0-rc.3",
"description": "Web-based molecule sketcher",
"license": "Apache-2.0",
"homepage": "http://lifescience.opensource.epam.com/ketcher",
Expand Down Expand Up @@ -44,8 +44,7 @@
"assert": "^2.0.0",
"lodash": "^4.17.21",
"raphael": "^2.3.0",
"svgpath": "^2.3.1",
"utf8": "^3.0.0"
"svgpath": "^2.3.1"
},
"devDependencies": {
"@babel/core": "^7.17.9",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@

import { Struct, Text } from 'domain/entities'
import { getNodeWithInvertedYCoord } from '../helpers'
import { utf8Converter } from '../utf8Converter'

export function textToStruct(ketItem: any, struct: Struct) {
const object = getNodeWithInvertedYCoord(ketItem.data)
struct.texts.add(new Text(utf8Converter(object, 'decode')))
struct.texts.add(new Text(object))

return struct
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
* limitations under the License.
***************************************************************************/
import { getNodeWithInvertedYCoord } from '../helpers'
import { utf8Converter } from '../utf8Converter'

export function textToKet(textNode) {
return {
type: 'text',
data: getNodeWithInvertedYCoord(utf8Converter(textNode.data, 'encode'))
data: getNodeWithInvertedYCoord(textNode.data)
}
}
12 changes: 0 additions & 12 deletions packages/ketcher-core/src/domain/serializers/ket/utf8Converter.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/ketcher-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ketcher-react",
"version": "2.6.0-rc.2",
"version": "2.6.0-rc.3",
"description": "Web-based molecule sketcher",
"license": "Apache-2.0",
"homepage": "http://lifescience.opensource.epam.com/ketcher",
Expand Down
2 changes: 1 addition & 1 deletion packages/ketcher-standalone/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ketcher-standalone",
"version": "2.6.0-rc.2",
"version": "2.6.0-rc.3",
"description": "Web-based molecule sketcher",
"license": "Apache-2.0",
"homepage": "http://lifescience.opensource.epam.com/ketcher",
Expand Down
8 changes: 0 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11226,7 +11226,6 @@ __metadata:
typedoc: ^0.22.17
typedoc-plugin-markdown: ^3.12.1
typescript: ^4.5.2
utf8: ^3.0.0
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -17999,13 +17998,6 @@ __metadata:
languageName: node
linkType: hard

"utf8@npm:^3.0.0":
version: 3.0.0
resolution: "utf8@npm:3.0.0"
checksum: cb89a69ad9ab393e3eae9b25305b3ff08bebca9adc839191a34f90777eb2942f86a96369d2839925fea58f8f722f7e27031d697f10f5f39690f8c5047303e62d
languageName: node
linkType: hard

"util-deprecate@npm:^1.0.1, util-deprecate@npm:^1.0.2, util-deprecate@npm:~1.0.1":
version: 1.0.2
resolution: "util-deprecate@npm:1.0.2"
Expand Down