Inline.Code_spanCode spans.
The type for code spans.
val make : backtick_count:Layout.count -> Block_line.tight list -> tmake ~backtick_count code_layout is a code span with given parameters.
Warning. Nothing is made to ensure correctness of the data, use of_string to compute the right amount of backticks.
of_string s is a code span for s. s can start with or include backticks; the appropriate minimal backtick count and possible needed leading and trailing space are computed accordingly. If s contains newlines, blanks after newlines are treated as layout like during parsing. meta is used for the lines of the resulting code layout (see code_layout).
val backtick_count : t -> Layout.countbacktick_count cs is the number of delimiting backticks.
val code : t -> stringcode cs computes from code_layout the code in the span cs.
val code_layout : t -> Block_line.tight listcode_layout cs is the code data in a form that allows layout preservation.
The actual code data is the tight block lines concatenated and separated by space and if the result starts and ends with a space and is not only made of spaces, these should be dropped. The code function does all that for you.