Horizontal scrolling in the code block

Please bring back horizontal scrolling in the code block like it was in earlier versions of obsidian. Why was it removed?

Here’s how it should look

Even the code block on the site looks the way I want it to look in obsidian

BigDecimal newIncomeValue = new BigDecimal(newIncome.getValue().toString());  
BigDecimal positionQuantity = new BigDecimal(newIncome.getPosition().getQuantity().toString());  
if (newIncomeValue.compareTo(positionQuantity) == -1) {  
    BigDecimal remain = positionQuantity.subtract(newIncomeValue);  
    QueriesPosition reloadedPosition = dataManager.reload(newIncome.getPosition(), "queriesPosition-full");  
    QueriesPosition splitPosition = copyPosition(reloadedPosition);  
    if (Boolean.TRUE.equals(reloadedPosition.getIsMeasureUnitChanged())){  
        BigDecimal coefficient = new BigDecimal(splitPosition.getCoefficientForMeasureUnitChange().toString());  
        Double newOldQuantity = remain.doubleValue() / coefficient.doubleValue();  
        splitPosition.setOldQuantity(new BigDecimal(newOldQuantity.toString()).setScale(5,RoundingMode.HALF_DOWN).doubleValue());  

Here’s what it looks like in Obsidian

I remember somewhere there was a setting for horizontal scrolling of the entire page, including code blocks, but this is not what I need. I want horizontal scrolling for code blocks only.
And in earlier versions it was in obsidian by default.

I’m not asking for code scrolling to be the default. Just make customization possible.

I hope this post gets noticed and upvoted

I use this CSS snippet to achieve no-wrap in preview mode only.

.markdown-rendered :not(.print) code,
body :not(.print) code {
  word-break: normal;
  word-wrap: break-word;
  white-space: pre;
1 Like
1 Like