I am trying to:
- form an ASCII art directory structure (similar to this fastlane snippet) in markdown (specifically on github comments).
But it has to have hyperlinks in it, so, the usual
`verbatim`
will not work. ∴ I am looking for some way to format normal markdown text in themonospace
font-family and give explicit spaces and explicit line breaks to preserve the structure.
I have found solutions for:
monospace
: the html tag teletypett
orcode
works- explicit space: the non-breaking space
&nbps;
seems good alternate- to insert it directly as
- for records:
	
doesn't work
- to insert it directly as
Remains:
- how to elegantly give explicit line breaks
- (any other solution/advice/suggestion is welcome too)
Where do I stand:
- Using
<tt>...</tt>
per line works in preserving line breaks, but due to the inherent inline nature it doesnt render good - Using
<tt>...</tt>
at block level (similar to recommended usage ofdetails
tag) gives a super awesome rendering, but doesnt provide any way to insert single line breaks (i think t's called soft break?) ... - ... none work among these:
/ <enter>
;<br/>
;

;
(CRLF). I found these via Whitespace_character article referred in mailtrap blog on nbsp; and this SO answer - ... 2
<enters>
provides 2 line breaks in render too
Sources of trials:
<tt>/</tt>
<tt>├── fastlane</tt>
<tt>└── fastlane</tt>
<tt> ├── [changelog]</tt>
<tt> │ ├ ...</tt>
<tt> │ ├ ...</tt>
[changelog]: https://example.com
<tt>
/
├── fastlane \
└── fastlane <br/>
├── [changelog] 

│ ├ ...
│ ├ ...
│ ├ ...
</tt>
[changelog]: https://example.com
Addendum:
- Duplicate search: monospace but not verbatim
- I was reading the GitHub flavored Markdown gfm/#example-141 and that example obviously didn't work in comments, so... I dont't know what spec sheet do github comments follow.
- Some useful pages on this topic: w3s/html_entities ; html-escape-chars ; named-chars via html.com ;
` works in the vscodium's markdown preview. so, the issue is with github or other things not supporting this combination of these tags in markdown. – user8395964 Aug 21 '22 at 18:41