You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Outline view + Markdown: Do not display the "#"s #53992
feature-requestRequest for new features or functionalitymarkdown-extThe Markdown extension: language features and previewunder-discussionIssue is under discussion for relevance, priority, approach
The Outline view for Markdown already displays headers and sub-headers in a structured way; there is no need to pollute the view with "#"s to show the header levels.
Reacted by NavyAdmiral, Xiangdong Zeng, Yu Zhang, diabolicle, odonyde, LonMcGregor, Attila Gonda, Igor Krupenja, Stefano Cecere, Christian Kosmowski and 100 more
Reacted by haanamomo, Chasen Liu, vincent_b, Dave Nicoll, Yoshi, GBEYOND, AClon, Julia J. Greenwald, Yuchen Shi and sgon00
I support this feature request: Displaying markdown hashes in the outline view is not only redundant (the tree structure already holds this information), but also distracts from the actual content (the section title).
Reacted by Kristijan Lenac, kaubu, karnak, AClon, Sherrie L. Fuqua, jake, Eddie Carswell, Ridley Winters, CCCHHHRRR, Julia J. Greenwald and 1 more
It seems like this was done totally on purpose. Since i cannot estimate the side effects besides the display in the outline i won't file a merge request. But i think we could just remove getSymbolName and replace it with entry.text in two places here:
Just ran across this - I wholeheartedly agree that this should be at least a setting; the hash chars don't add anything the indentation doesn't already address.
Reacted by Kristijan Lenac, Alberto Fabbri, jake, Eddie Carswell and Lucas Parzianello
extension.js no longer has the getSymbolName function. Is there anyone who knows other way to remove the annoy "#"? pisces312 , @koffeeboi , Christian Kosmowski (@ckosmowski)
May 2024 and this is still an issue with VSCode 1.89.0. Seems the function has again changed names. It's no longer #getTocSymbolName(e) now it's just #se(e) - ignoring the function name, just searching the workerMain.js file for:
{return"#".repeat(e.level)+" "+e.text}
and replacing it with:
{return" ".repeat(e.level)+e.text}
still applies the fix.
Reacted by kusare, Kristijan Lenac, kaubu, King Kunz, Jim, autosquash, Eddie Carswell and 李小龙
I'm using 1.92.1 on macOS. What would be the path and file that is equivalent to resources\app\extensions\markdown-language-features\server\dist\node\workerMain.js?
I've found this path:
/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/markdown-language-features/dist
Which contains a serverWorkerMain.js file. That file includes the text that N. Phillip Cole (@nonplayer) says should be replaced, but replacing it doesn't fix the issue.
Do I need to do something else (beyond restarting VSCode) to get the change to register? Or am I editing the wrong file?
I'm using 1.92.1 on macOS. What would be the path and file that is equivalent to resources\app\extensions\markdown-language-features\server\dist\node\workerMain.js?
I've found this path:
/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/markdown-language-features/dist
Which contains a serverWorkerMain.js file. That file includes the text that N. Phillip Cole (@nonplayer) says should be replaced, but replacing it doesn't fix the issue.
Do I need to do something else (beyond restarting VSCode) to get the change to register? Or am I editing the wrong file?
Coincidentally, I just today updated and just now came here to post that the file had again changed location to: .\resources\app\extensions\markdown-language-features\distserverWorkerMain.js
However I didn't encounter the same trouble you are reporting. I was able to do a find and replace, finding the same string as previous:
{return"#".repeat(e.level)+" "+e.text}
and replacing it with:
{return" ".repeat(e.level)+e.text}
Saving and re-opening VSCode applied the fix for me as expected. However, I'm on Windows, maybe that makes a difference somehow?
I'm quite befuddled as to why they have not fixed this obvious bug yet.
Reacted by yang, kaubu, Kostiantyn Rudenko, Eddie Carswell, Matsuyanagi, AClon, Yong Li, Minh and Fran
For those who may be using a remote development extension, you can make the above edit using the below code (on the remote):
shopt -s globstar
# In an SSH remote
sed -i 's/return"#".repeat(e.level)+" "+e.text/return e.text/g' \
~/.vscode-server/cli/servers/Stable-*/server/extensions/markdown-language-features/**/*.js
# Or in a devcontainer
sed -i 's/return"#".repeat(e.level)+" "+e.text/return e.text/g' \
~/.vscode-server/bin/*/extensions/markdown-language-features/**/*.js
This will naturally need to be run again after an update.
How come this problem has never been officially solved? How nice to give a configuration item, otherwise you have to change it manually every time you update the version.
Reacted by AClon, Yong Li, Oleg, N. Phillip Cole, Tsuyumi25 and Julia J. Greenwald
I agree that the ## in the Outline View should not be visible in the VS Code Outline View. ## is a formatting marker for .md files for telling that this is a header, so it does not have its place when the header is represented as a header.
Unfortunately, this issue has remained unresolved since 2018.
Is there a VS Code extension extending the Outline View? The Outline view is a crucial Markdown feature that requires full attention.
Reacted by Alberto Fabbri, kaubu, Martin Rimskog, Diego Mateos, CharlesLiaoO, Valkalon, N. Phillip Cole, Lorenz De Witte-Vroman, Daniel Hutzel and Tsuyumi25
I would also like to see the outline work when viewing the Markdown preview full screen. If this is also important to you, please consider upvoting this related issue: #316113
It's 2026, and this has been open now for eight years. In fact, in recent version 1.125.0 they even overhauled the entire serverWorkerMain.js file and changed the code... and still someone deliberately chose to keep this bug in place.
The new snippet to search for is: return "#".repeat(entry.level) + " " + entry.text;
Replace it with: return "".repeat(entry.level) + entry.text;
Reacted by Michael Hill, Jehong Ahn, Oleg, Lukas Graz and sgon00
feature-requestRequest for new features or functionalitymarkdown-extThe Markdown extension: language features and previewunder-discussionIssue is under discussion for relevance, priority, approach
Activity
stone-zeng commentedon Jul 17, 2018
It would be better to use different icons (not only "[abc]") to show different header levels.
odonyde commentedon Jun 6, 2019
I support this feature request: Displaying markdown hashes in the outline view is not only redundant (the tree structure already holds this information), but also distracts from the actual content (the section title).
StefanoCecere commentedon Dec 17, 2019
we need a custom outline view just for markdown files
ckosmowski commentedon Jan 24, 2020
It seems like this was done totally on purpose. Since i cannot estimate the side effects besides the display in the outline i won't file a merge request. But i think we could just remove
getSymbolNameand replace it withentry.textin two places here:vscode/extensions/markdown-language-features/src/features/documentSymbolProvider.ts
Lines 55 to 74 in 28bf0b1
and then
getSymbolNameis also obsolete.pisces312 commentedon Jan 4, 2021
I changed the getSymbolName function in resources\app\extensions\markdown-language-features\dist\extension.js to remove '#' char as a workaround.
ZenaMel commentedon Jul 15, 2021
pisces312 answer should at least be implemented as a config option.
Here's a visual comparison showing how much more "clutter" the unnecessary
#'s create:yyangdid commentedon Dec 11, 2021
I also don't like the '
#with outline, and I also don't want change the native source code file with VSCode or extensions .So, I temporarily use Emoji to better distinguish the headers level, this:
And, I really want an option to hidden
#😁vancejc-mt commentedon Aug 17, 2022
Just ran across this - I wholeheartedly agree that this should be at least a setting; the hash chars don't add anything the indentation doesn't already address.
Herman-Wu commentedon Sep 27, 2022
extension.jsno longer has thegetSymbolNamefunction. Is there anyone who knows other way to remove the annoy "#"? pisces312 , @koffeeboi , Christian Kosmowski (@ckosmowski)7 remaining items
AlbertoFabbri93 commentedon Jul 15, 2023
I agree that the hash chars add unnecessary clutter to the outline view. It would be awesome to have a setting for this
nonplayer commentedon Dec 26, 2023
This is especially frustrating as a Portable Mode user. Having to go in and manually make this change every time I upgrade VSCode is a chore.
nonplayer commentedon May 9, 2024
May 2024 and this is still an issue with VSCode 1.89.0. Seems the function has again changed names. It's no longer
#getTocSymbolName(e)now it's just#se(e)- ignoring the function name, just searching the workerMain.js file for:and replacing it with:
still applies the fix.
jim0203 commentedon Aug 15, 2024
I'm using 1.92.1 on macOS. What would be the path and file that is equivalent to
resources\app\extensions\markdown-language-features\server\dist\node\workerMain.js?I've found this path:
/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/markdown-language-features/distWhich contains a
serverWorkerMain.jsfile. That file includes the text that N. Phillip Cole (@nonplayer) says should be replaced, but replacing it doesn't fix the issue.Do I need to do something else (beyond restarting VSCode) to get the change to register? Or am I editing the wrong file?
nonplayer commentedon Aug 15, 2024
Coincidentally, I just today updated and just now came here to post that the file had again changed location to:
.\resources\app\extensions\markdown-language-features\distserverWorkerMain.jsHowever I didn't encounter the same trouble you are reporting. I was able to do a find and replace, finding the same string as previous:
and replacing it with:
Saving and re-opening VSCode applied the fix for me as expected. However, I'm on Windows, maybe that makes a difference somehow?
I'm quite befuddled as to why they have not fixed this obvious bug yet.
AfroThundr3007730 commentedon Nov 5, 2024
For those who may be using a remote development extension, you can make the above edit using the below code (on the remote):
This will naturally need to be run again after an update.
lxl80 commentedon Apr 23, 2025
How come this problem has never been officially solved? How nice to give a configuration item, otherwise you have to change it manually every time you update the version.
oeloo commentedon Jun 18, 2025
I agree that the
##in the Outline View should not be visible in the VS Code Outline View.##is a formatting marker for .md files for telling that this is a header, so it does not have its place when the header is represented as a header.Unfortunately, this issue has remained unresolved since 2018.
Is there a VS Code extension extending the Outline View? The Outline view is a crucial Markdown feature that requires full attention.
valkalon commentedon Jul 30, 2025
if you could add the setting "Outline: Show markdown #" with a simple checkbox, that would be fantastic.
Matsuyanagi commentedon Mar 20, 2026
I wrote a .ps1 file to perform this replacement for Windows.
https://github.com/Matsuyanagi/replace_vscode_outline_hash
sck-jenzabar commentedon May 27, 2026
I would also like to see the outline work when viewing the Markdown preview full screen. If this is also important to you, please consider upvoting this related issue: #316113
nonplayer commentedon Jun 18, 2026
It's 2026, and this has been open now for eight years. In fact, in recent version 1.125.0 they even overhauled the entire
serverWorkerMain.jsfile and changed the code... and still someone deliberately chose to keep this bug in place.The new snippet to search for is:
return "#".repeat(entry.level) + " " + entry.text;Replace it with:
return "".repeat(entry.level) + entry.text;valkalon commentedon Jun 19, 2026
thanks N. Phillip Cole (@nonplayer) . Yes would be great to solve this finally.