Repository navigation
Nutrient DWS: ask for inline formatting in the hosted Markdown - #2
Open
etienne-alby wants to merge 3 commits into
Open
etienne-alby wants to merge 3 commits into
etienne-alby wants to merge 3 commits into
Conversation
MatusPizur
approved these changes
Oct 22, 2026
…WS's defaults All five Markdown switches are in the public contract now; hosted pins the documented defaults for the four the provider doesn't send. Move the instruction tests above the main guard.
…e words When output.markdown is the graded body, send includeHeadersAndFooters and extractWordsFromPictures. The graph body keeps that text, so both bodies are asked for the same content. The graph request is unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Nutrient DWS provider now asks DWS to write bold, italic, underline, strikethrough, superscript and subscript into its Markdown. DWS leaves them out unless the request sets
enableInlineFormatting, which the provider never sent. A run that grades DWS's own Markdown (body_source: "hosted") therefore scored no inline styles.When the hosted Markdown is the graded body, the provider also asks for running headers, footers and the words inside pictures. The default graph body already keeps that text, so the two bodies are now asked for the same content and can be compared fairly.
Changes
outputnow carries"enableInlineFormatting": truenext toincludeWords.body_source: "hosted",outputalso carries"includeHeadersAndFooters": trueand"extractWordsFromPictures": true. Both default to false in the public DWS contract.enableInlineFormatting, which affects onlyoutput.markdown.The NativeSDK Maestro benchmark uses this branch through PSPDFKit/GdPicture#3838. That PR pins
PARSEBENCH_REFand makes the local DWS shim pass the options to maestrod. The pin should move to this PR's head, or to the squash commit if this PR is squash-merged.Testing
NUTRIENT_DWS_BODY_SOURCE), only the Markdown format in text mode.test_nutrient_dws_errors.pyandtest_nutrient_dws_markdown.py: 33 passed.ruff checkandruff format --checkpass on both changed files.🤖 Generated with Claude Code