Julia-sublime
Julia-sublime copied to clipboard
Docstrings are treated as regular strings if they are indented
Docstrings are treated as regular strings if they are indented,

Is there a way to fix this?
It is intended. Doc strings have to be at the top level.
@randy3k do you mean at the top indentation level? why is that?
Julia does support doc strings which are not at the top level and where it is natural to use indentation, e.g.,
Example 1: doc strings for entities inside a module
, perhaps nested
#Example 2: doc strings for inner constructors using the @doc
macro as described here.
For Example 2, it seems we should be able to recognize when @doc
is being used to define a doc string and highlight appropriately. That would also help with Example 1, where the user can write @doc
before the indented doc string to produce the desired syntax highlighting.
It does seem possible to force a docstring using "@doc raw" https://github.com/JuliaEditorSupport/Julia-sublime/blob/4fde0fdeddb3ca8486d3f490a2f051cba39a0a48/Julia.sublime-syntax#L121