Skip to content

Commit

Permalink
fix for single line value with RTL text
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Michálek committed Mar 19, 2021
1 parent 382f895 commit 851b918
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Highlighter.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ class Highlighter extends Component {
const config = readConfigFromChildren(children)

let resultComponents
// If auto direction is used and the value contains newlines, split be \n and iterate over each line separately
if (_unstableAutoDirection && value.indexOf('\n') !== -1) {
// If auto direction is used split by \n and iterate over each line separately
if (_unstableAutoDirection) {
const lines = value.split('\n')
resultComponents = lines.map((value, index) => (
<div key={index} dir="auto">{this.renderLine({
Expand Down

0 comments on commit 851b918

Please sign in to comment.