-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add MAPI resolver #54
Conversation
f3ee9e4
to
7febf1a
Compare
7febf1a
to
64fc52e
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #54 +/- ##
==========================================
- Coverage 94.79% 93.05% -1.74%
==========================================
Files 19 21 +2
Lines 365 360 -5
Branches 68 82 +14
==========================================
- Hits 346 335 -11
- Misses 19 25 +6 ☔ View full report in Codecov by Sentry. |
tests/transfomers/portable-text-transformer/html-transformer.spec.ts
Outdated
Show resolved
Hide resolved
tests/transfomers/portable-text-transformer/vue-transformer.spec.ts
Outdated
Show resolved
Hide resolved
94db595
to
c4d8010
Compare
} | ||
} | ||
|
||
return throwError("Cannot parse a node that is not a root node."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for confusion, I wanted you to use this function only with ternary operators :D Here I would prefer to the normal
throw new Error("Cannot parse a node that is not a root node.")
return [block]; | ||
} | ||
const transformImage: TransformElementFunction<FigureElementAttributes> = (node) => { | ||
const imageTag = node.children[0] as DomHtmlNode<ImgElementAttributes> | undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is still not correct, it would be better to use some kind of typeguard or conditions at least that the tagName
really is in the image tag, even though this code will actually behave kind of correctly, it's still kind of feels a workaround :/
c4d8010
to
92c30c7
Compare
Motivation
DEVREL-1172
Adds transformation logic from portable text to MAPI valid rich text.
Checklist
How to test
If manual testing is required, what are the steps?