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

Multiline string and # #175

Open
mauro3 opened this issue Nov 9, 2021 · 3 comments
Open

Multiline string and # #175

mauro3 opened this issue Nov 9, 2021 · 3 comments

Comments

@mauro3
Copy link

mauro3 commented Nov 9, 2021

In a multiline string a # shouldn't do anything. E.g. this errors:

"""
A fn

# Example

An ex.
"""
f(x) = 1

with ERROR: LoadError: LoadError: syntax: incomplete: invalid string syntax in expression starting at string:1

Work-around

"""
A fn

## Example

An ex.
"""
f(x) = 1

Note, this is not tied to doc-strings but in general multi-line strings.

@fredrikekre
Copy link
Owner

I don't think this can be easily fixed without a Julia parser...

@mauro3
Copy link
Author

mauro3 commented Nov 9, 2021

I see, no worries.

@MarkNahabedian
Copy link

I was considering asking this in a separate issue, but it kind of resonates with this one.

I'm curious why Literate chose to overload Julia comments for documentation text rather than using top level Markdown strings?

Might this be changed in a furure major relase, or maybe become controlable through a global flag?

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

3 participants