Skip to content

Embedded Code preview incorrect - (` hyphens and /// blocks and comment openings) #441

@HuskyNator

Description

@HuskyNator

The highlighting does not always work when tokens/characters are exchanged.
Note: https://dlang.org/spec/ddoc.html#embedded_comments

  1. The example given by the page above, also given below, does not function when ``` is used instead of ---, even though ```` does.
  2. Additionally, using /// instead of /++,+,+/ breaks the spacing of the embeded coding preview. (https://dlang.org/spec/ddoc.html#lexical)
  3. Comment openings are not ignored when the documentation starts on the same line as the initial comment line.
/++
 + Our function.
 +
 + Example:
 + ---
 + import std.stdio;
 +
 + void foo()
 + {
 +     writeln("foo!");  /* print the string */
 + }
 + ---
 +/

Expected result:
image

Modified results:

  1. replace --- with ```
    image
  2. replace /++,+,+/ with ///
    image
  3. documentation starts on the same line as the initial comment line
    image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions