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

Spaces in attribute lists of code blocks #39

Closed
TobiasZawada opened this issue Jul 31, 2023 · 1 comment
Closed

Spaces in attribute lists of code blocks #39

TobiasZawada opened this issue Jul 31, 2023 · 1 comment

Comments

@TobiasZawada
Copy link
Collaborator

TobiasZawada commented Jul 31, 2023

The asciidoctor manual accepts spaces at the beginning of the language attribute of code blocks. Furthermore, the language attribute can also be given as named attribute source-language.

So

[source,emacs-lisp]
----
	(message "Hello world")
----

is the same as

[source, emacs-lisp]
----
	(message "Hello world")
----

and as

[source, source-language = emacs-lisp]
----
	(message "Hello world")
----

Only the first version is fontified as emacs-lisp in origin/master at commit b0702bdeb8d799720661766936c36ec3b454c609.

@TobiasZawada
Copy link
Collaborator Author

@bbatsov Actually, a general parser for block attributes would be better.
But, this would go into another branch since it is not a bugfix.

TobiasZawada pushed a commit that referenced this issue Jul 31, 2023
TobiasZawada pushed a commit that referenced this issue Aug 1, 2023
Add ert tests for
- literal code blocks (....)
- ignored whitespace after leading comma of 2nd attribute and at end of attr line
TobiasZawada pushed a commit that referenced this issue Aug 3, 2023
TobiasZawada pushed a commit that referenced this issue Aug 3, 2023
Add ert tests for
- literal code blocks (....)
- ignored whitespace after leading comma of 2nd attribute and at end of attr line
TobiasZawada pushed a commit that referenced this issue Aug 3, 2023
TobiasZawada pushed a commit that referenced this issue Aug 3, 2023
Add ert tests for
- literal code blocks (....)
- ignored whitespace after leading comma of 2nd attribute and at end of attr line
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