Skip to content

Commit

Permalink
Merge pull request #14822 from marktoman/main
Browse files Browse the repository at this point in the history
Preserve text inside code fences
  • Loading branch information
bondydaa authored Feb 20, 2023
2 parents 401cbca + 0557cb5 commit 80890b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/components/HTMLEngineProvider/BaseHTMLEngineProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,17 @@ import fontFamily from '../../styles/fontFamily';
const propTypes = {
/** Whether text elements should be selectable */
textSelectable: PropTypes.bool,

/** Handle line breaks according to the HTML standard (default on web) */
enableExperimentalBRCollapsing: PropTypes.bool,

children: PropTypes.node,
};

const defaultProps = {
textSelectable: false,
children: null,
enableExperimentalBRCollapsing: false,
};

// Declare nonstandard tags and their content model here
Expand Down Expand Up @@ -70,6 +75,7 @@ const BaseHTMLEngineProvider = (props) => {
defaultViewProps={defaultViewProps}
renderers={htmlRenderers}
computeEmbeddedMaxWidth={HTMLEngineUtils.computeEmbeddedMaxWidth}
enableExperimentalBRCollapsing={props.enableExperimentalBRCollapsing}
>
{props.children}
</RenderHTMLConfigProvider>
Expand Down
2 changes: 1 addition & 1 deletion src/components/HTMLEngineProvider/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import BaseHTMLEngineProvider from './BaseHTMLEngineProvider';
import {propTypes, defaultProps} from './htmlEnginePropTypes';

const HTMLEngineProvider = props => (
<BaseHTMLEngineProvider debug={props.debug}>
<BaseHTMLEngineProvider debug={props.debug} enableExperimentalBRCollapsing>
{props.children}
</BaseHTMLEngineProvider>
);
Expand Down

0 comments on commit 80890b9

Please sign in to comment.