Skip to content

Add #line directives when tangling C/CPP code #1

Open

Description

@loebl

For each code block add a #line directive just above it with the line number and file name of the markdown source file. This way compiler errors point to the correct position in the markdown file.

NOTE: It might be necessary to also add a line directory under included sub-blocks, as one block can be composed of arbitrarily nested blocks, leading to jumping in the line numbering (so basically each block has a line directive on enter and on exit)

NOTE2: Of course this feature needs to be optional, as not every language supports it. (and maybe not every user cares about it)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions