Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Post History

66%
+2 −0
Q&A how do I get markdown to render # as a shell prompt and not a comment?

Note that, by declaring sh as the language, you have implicitly declared "a # introduces a comment", because that's what is implied by the sh syntax. But you say you don't want that interpretation...

posted 25d ago by bignose‭  ·  edited 25d ago by bignose‭

Answer
#7: Post edited by user avatar bignose‭ · 2025-01-28T00:29:00Z (25 days ago)
  • Note that, by declaring `sh` as the language, you have implicitly declared "a `#` introduces a comment", because that's what is implied by the `sh` syntax.
  • But you say you don't want that interpretation. Therefore, **the text you're formatting is not valid `sh` language text**.
  • So, to avoid `sh` interpretation of your text, you need to avoid declaring `sh` as the language of your text.
  • Rather, you are presenting a plain text example: text that the person might see in their terminal console, including the `#` prompt before input.
  • That's done with the `console` declaration (maybe others).
  • ```console
  • # echo hi
  • ```
  • ```console
  • # echo hi
  • ```
  • Note that, by declaring `sh` as the language, you have implicitly declared "a `#` introduces a comment", because that's what is implied by the `sh` syntax.
  • But you say you don't want that interpretation. Therefore, **the text you're formatting should not be interpreted as `sh` language text**.
  • So, to avoid `sh` interpretation of your text, you need to avoid declaring `sh` as the language of your text.
  • Rather, you are presenting a plain text example: text that the person might see in their terminal console, including the `#` prompt before input.
  • That's done with the `console` declaration (maybe others).
  • ```console
  • # echo hi
  • ```
  • ```console
  • # echo hi
  • ```
#6: Post edited by user avatar bignose‭ · 2025-01-28T00:28:29Z (25 days ago)
  • Note that, by declaring `sh` as the language, you have implicitly declared "a `#` introduces a comment", because that's what is implied by the `sh` syntax.
  • But you say you don't want that interpretation. Therefore, **the text you're formatting is not valid `sh` language text**.
  • So, to avoid `sh` interpretation of your text, you need to avoid declaring `sh` as the language of your text.
  • Rather, you are presenting a plain text example: text that the person might see in their terminal including the `#` prompt before input.
  • That's done with the `plaintext` declaration (maybe others).
  • ```plaintext
  • # echo hi
  • ```
  • ```plaintext
  • # echo hi
  • ```
  • Note that, by declaring `sh` as the language, you have implicitly declared "a `#` introduces a comment", because that's what is implied by the `sh` syntax.
  • But you say you don't want that interpretation. Therefore, **the text you're formatting is not valid `sh` language text**.
  • So, to avoid `sh` interpretation of your text, you need to avoid declaring `sh` as the language of your text.
  • Rather, you are presenting a plain text example: text that the person might see in their terminal console, including the `#` prompt before input.
  • That's done with the `console` declaration (maybe others).
  • ```console
  • # echo hi
  • ```
  • ```console
  • # echo hi
  • ```
#5: Post edited by user avatar bignose‭ · 2025-01-28T00:27:33Z (25 days ago)
  • Note that, by declaring `sh` as the language, you have implicitly declared "a `#` introduces a comment", because that's what is implied by the `sh` syntax.
  • But you say you don't want that interpretation. Therefore, the text you're formatting is not valid `sh` language text.
  • So, you don't actually want to declare `sh` as the language of your text, because you are not intending that it be valid `sh` language.
  • Rather, you are presenting a plain text example: text that the person might see in their terminal including the `#` prompt before input.
  • That's done with the `plaintext` declaration (maybe others).
  • ```plaintext
  • # echo hi
  • ```
  • ```plaintext
  • # echo hi
  • ```
  • Note that, by declaring `sh` as the language, you have implicitly declared "a `#` introduces a comment", because that's what is implied by the `sh` syntax.
  • But you say you don't want that interpretation. Therefore, **the text you're formatting is not valid `sh` language text**.
  • So, to avoid `sh` interpretation of your text, you need to avoid declaring `sh` as the language of your text.
  • Rather, you are presenting a plain text example: text that the person might see in their terminal including the `#` prompt before input.
  • That's done with the `plaintext` declaration (maybe others).
  • ```plaintext
  • # echo hi
  • ```
  • ```plaintext
  • # echo hi
  • ```
#4: Post edited by user avatar bignose‭ · 2025-01-28T00:26:40Z (25 days ago)
  • Note that, by declaring `sh` as the language, you have implicitly declared "a `#` introduces a comment", because that's what is implied by the `sh` syntax.
  • But you say you don't want that interpretation. Therefore, the text you're formatting is not valid `sh` language text.
  • So, you don't actually want to declare `sh` as the language of your text, because you are not intending that it be valid `sh` language.
  • Rather, you are presenting a plain text example: text that the person might see in their terminal including the `#` prompt before input.
  • That's done with the `plaintext` declaration (maybe others).
  • ```plaintext
  • echo hi
  • ```
  • ```plaintext
  • # echo hi
  • ```
  • Note that, by declaring `sh` as the language, you have implicitly declared "a `#` introduces a comment", because that's what is implied by the `sh` syntax.
  • But you say you don't want that interpretation. Therefore, the text you're formatting is not valid `sh` language text.
  • So, you don't actually want to declare `sh` as the language of your text, because you are not intending that it be valid `sh` language.
  • Rather, you are presenting a plain text example: text that the person might see in their terminal including the `#` prompt before input.
  • That's done with the `plaintext` declaration (maybe others).
  • ```plaintext
  • # echo hi
  • ```
  • ```plaintext
  • # echo hi
  • ```
#3: Post edited by user avatar bignose‭ · 2025-01-28T00:26:20Z (25 days ago)
  • Note that, by declaring `sh` as the language, you have implicitly declared "a `#` introduces a comment", because that's what is implied by the `sh` syntax.
  • But you say you don't want that interpretation. Therefore, the text you're formatting is not valid `sh` language text.
  • So, you don't actually want to declare `sh` as the language of your text, because you are not intending that it be valid `sh` language.
  • Rather, you are presenting a plain text example: text that the person might see in their terminal including the `#` prompt before input.
  • That's done with the `plaintext` language (maybe others).
  • ```plaintext
  • # echo hi
  • ```
  • Note that, by declaring `sh` as the language, you have implicitly declared "a `#` introduces a comment", because that's what is implied by the `sh` syntax.
  • But you say you don't want that interpretation. Therefore, the text you're formatting is not valid `sh` language text.
  • So, you don't actually want to declare `sh` as the language of your text, because you are not intending that it be valid `sh` language.
  • Rather, you are presenting a plain text example: text that the person might see in their terminal including the `#` prompt before input.
  • That's done with the `plaintext` declaration (maybe others).
  • ```plaintext
  • echo hi
  • ```
  • ```plaintext
  • # echo hi
  • ```
#2: Post edited by user avatar bignose‭ · 2025-01-28T00:24:52Z (25 days ago)
  • Note that, by declaring `sh` as the language, you have implicitly declared "a `#` introduces a comment", because that's what is implied by the `sh` syntax.
  • So, you don't actually want `sh` as the language of your text, because you are not intending that it be valid `sh` language.
  • Rather, you are presenting a plain text example: text that the person might see in their terminal including the `#` prompt before input.
  • That's done with the `plaintext` language (maybe others).
  • ```plaintext
  • # echo hi
  • ```
  • Note that, by declaring `sh` as the language, you have implicitly declared "a `#` introduces a comment", because that's what is implied by the `sh` syntax.
  • But you say you don't want that interpretation. Therefore, the text you're formatting is not valid `sh` language text.
  • So, you don't actually want to declare `sh` as the language of your text, because you are not intending that it be valid `sh` language.
  • Rather, you are presenting a plain text example: text that the person might see in their terminal including the `#` prompt before input.
  • That's done with the `plaintext` language (maybe others).
  • ```plaintext
  • # echo hi
  • ```
#1: Initial revision by user avatar bignose‭ · 2025-01-28T00:24:05Z (25 days ago)
Note that, by declaring `sh` as the language, you have implicitly declared "a `#` introduces a comment", because that's what is implied by the `sh` syntax.

So, you don't actually want `sh` as the language of your text, because you are not intending that it be valid `sh` language.

Rather, you are presenting a plain text example: text that the person might see in their terminal including the `#` prompt before input.

That's done with the `plaintext` language (maybe others).

```plaintext
# echo hi
```