Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
HuskyNator opened this issue Dec 12, 2022 · 1 comment
Labels

Comments

@HuskyNator
Copy link

HuskyNator commented Dec 12, 2022

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
@HuskyNator HuskyNator changed the title Embedded Code preview incorrect - (` hyphens and /// blocks) Embedded Code preview incorrect - (` hyphens and /// blocks & comment openings) Dec 12, 2022
@HuskyNator HuskyNator changed the title Embedded Code preview incorrect - (` hyphens and /// blocks & comment openings) Embedded Code preview incorrect - (` hyphens and /// blocks and comment openings) Dec 12, 2022
WebFreak001 added a commit to Pure-D/serve-d that referenced this issue Dec 13, 2022
@WebFreak001
Copy link
Member

1 is fixed in serve-d now, (nightly available in 24h) 2 and 3 need updates to DCD and will take a while longer to be released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants