[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #33741 [Core Tor/Tor]: Format code blocks inside markdown files (documentation)



#33741: Format code blocks inside markdown files (documentation)
--------------------------+------------------------
 Reporter:  bduszel       |          Owner:  (none)
     Type:  enhancement   |         Status:  new
 Priority:  Very Low      |      Milestone:
Component:  Core Tor/Tor  |        Version:
 Severity:  Minor         |     Resolution:
 Keywords:  doc easy      |  Actual Points:
Parent ID:                |         Points:
 Reviewer:                |        Sponsor:
--------------------------+------------------------

Comment (by bduszel):

 We could start by looking for code blocks without language specified.

 {{{
 ```
 // bash code
 ```
 }}}

 vs.

 {{{
 ```bash
 // bash code
 ```
 }}}

 Another check could be to search for all the lines starting with `$` and
 making sure these are inside bash code blocks. This approach won't work
 for code blocks with command output though:

 {{{
 $ git describe --contains ebab521525 // only this line would be recognized
 tor-0.3.2.3-alpha~15^2~4
 }}}

 However such search would at least let us know where commands are being
 used and what we should check manually.

 No idea how to recognize the following scenario though:

 {{{
 If you're writing an assertion to test for a bug that you _can_ recover
 from,
 use `tor_assert_nonfatal()` in place of `tor_assert()`.  If you'd like to
 write a conditional that incorporates a nonfatal assertion, use the
 `BUG()`
 macro, as in:

         if (BUG(ptr == NULL))
                 return -1;

 ## Allocator conventions
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/33741#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs