mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-24 20:42:29 +00:00
Treat two hash marks followed by text as a doc comment
This commit is contained in:
parent
4dca0546f4
commit
723c390f52
3 changed files with 3 additions and 15 deletions
|
@ -437,11 +437,8 @@ where
|
|||
Some(b'#') => {
|
||||
state.advance_mut(1);
|
||||
|
||||
let is_doc_comment = state.bytes().first() == Some(&b'#')
|
||||
&& (state.bytes().get(1) == Some(&b' ')
|
||||
|| state.bytes().get(1) == Some(&b'\n')
|
||||
|| begins_with_crlf(&state.bytes()[1..])
|
||||
|| Option::is_none(&state.bytes().get(1)));
|
||||
let is_doc_comment =
|
||||
state.bytes().first() == Some(&b'#') && state.bytes().get(1) != Some(&b'#');
|
||||
|
||||
if is_doc_comment {
|
||||
state.advance_mut(1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue