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

Non-invasive mdoc annotations #570

Open
saksmt opened this issue Oct 20, 2021 · 0 comments
Open

Non-invasive mdoc annotations #570

saksmt opened this issue Oct 20, 2021 · 0 comments

Comments

@saksmt
Copy link

saksmt commented Oct 20, 2021

Currently only option to provide metadata/annotations to mdoc is to write them in code fences where language is specified, downside is that this breaks syntax highlighting everywhere except github (currently, aaand it fails in nesting - this issue is perfect example).

Instead of waiting for support in IDEA, gitlab and other tools it'd be better to just add another configurations option through comments in either markdown (html/xml or pseudo-link) itself or inside code snippet.

Use cases it enables:


Current behavior:

```scala mdoc:someMeta
val codeWithBrokenHighlighting = ???
```

Using html/xml comments:

<!-- mdoc someMeta -->
```scala
val codeWithWorkingHighlighting = ???
```

Using preudo-links:

[//]: # (mdoc:someMeta)
```scala
val codeWithWorkingHighlighting = ???
```

Using comments inside code snippet:

```scala
// mdoc someMeta
val codeWithWorkingHighlighting = ???
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant