SAP

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
⤢ Open full site

Code Block Enhancements

Demonstrate the five code-block enhancements: console blocks that separate prompts from output, diff markers, fill-in placeholders, file-tree fences, and `:::walkthrough` code-plus-notes.

Overview

You will learn

  • ✔How console fences separate commands from output and copy commands only
  • ✔How diff markers (// [!code ++] / -- / focus / highlight) annotate changes
  • ✔How placeholders: auto turns <YOUR_…> tokens into fillable chips
  • ✔How tree fences render project structure, and how :::walkthrough pairs code with notes
SAP Developer Advocates S SAP Developer Advocates November 6, 2026
Created on November 6, 2026
Contributors

More from SAP Developer Advocates

See all 6 tutorials by SAP Developer Advocates →

Prerequisites

  • A BTP trial account (you will need <YOUR_SUBACCOUNT_ID> below)
  • Node.js 18+ installed

Steps

Step 1 Step 1: Console blocks — prompts and output separation
—

Console blocks separate command lines from output. Tag your fence console, shell-session, or terminal-session. Lines starting with $, >, or PS> are commands; all other lines are output. The copy button copies commands only, without prompts.

Terminal
cf login -a https://api.cf.eu10.hana.ondemand.comAPI endpoint: https://api.cf.eu10.hana.ondemand.comEmail: user@example.comPassword: ••••••••cf target -s devAPI endpoint: https://api.cf.eu10.hana.ondemand.com (v3)Org: myorg  Space: devcf appsGetting apps in org myorg / space dev...name            requested state   processestutorials-srv   started           web:1/1

Copying this block yields three lines: the three cf commands, prompts stripped.

Multi-line continuation works too:

Terminal
cf create-service hana hdi-shared \my-hdi-containerCreating service instance my-hdi-container...
Step 2 Step 2: Diff markers — annotate changes
+
Step 3 Step 3: Fill-in placeholders
+
Step 4 Step 4: File tree fences
+
Step 5 Step 5: Walkthrough — code + notes
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 5
1. Step 1: Console blocks — prompts and output separation 2. Step 2: Diff markers — annotate changes 3. Step 3: Fill-in placeholders 4. Step 4: File tree fences 5. Step 5: Walkthrough — code + notes