Skip to content

Commit

Permalink
feat(Arduino): Support arduino .ino files
Browse files Browse the repository at this point in the history
  • Loading branch information
zak-cloudnc committed Feb 11, 2020
1 parent ebf6a12 commit f282789
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 41 deletions.
16 changes: 16 additions & 0 deletions test/fixtures/fixture-in-place.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,22 @@ int main()

```

Arduino

```cpp
// snippets/sample.ino

#include <iostream>
using namespace std;

int main()
{
cout << "Hello, World!";
return 0;
}

```

C

```c
Expand Down
99 changes: 58 additions & 41 deletions test/snapshots/test.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,22 @@ Generated by [AVA](https://ava.li).
```␊
Arduino␊
```cpp␊
// snippets/sample.ino␊
#include <iostream>␊
using namespace std;␊
int main()␊
{␊
cout << "Hello, World!";␊
return 0;␊
}␊
```␊
C␊
```c␊
Expand Down Expand Up @@ -537,47 +553,48 @@ Generated by [AVA](https://ava.li).
test/fixtures/fixture-in-place.md#L43-L48 Embedded 2 lines from file snippets/sample.py␊
test/fixtures/fixture-in-place.md#L52-L59 Embedded 4 lines from file snippets/sample.rs␊
test/fixtures/fixture-in-place.md#L63-L75 Embedded 9 lines from file snippets/sample.cpp␊
test/fixtures/fixture-in-place.md#L79-L90 Embedded 8 lines from file snippets/sample.c␊
test/fixtures/fixture-in-place.md#L94-L106 Embedded 9 lines from file snippets/sample.java␊
test/fixtures/fixture-in-place.md#L110-L121 Embedded 8 lines from file snippets/sample.go␊
test/fixtures/fixture-in-place.md#L125-L131 Embedded 3 lines from file snippets/sample.sh␊
test/fixtures/fixture-in-place.md#L135-L141 Embedded 3 lines from file snippets/sample.sh␊
test/fixtures/fixture-in-place.md#L145-L157 Embedded 9 lines from file snippets/sample.m␊
test/fixtures/fixture-in-place.md#L161-L170 Embedded 6 lines from file snippets/sample.scss␊
test/fixtures/fixture-in-place.md#L174-L181 Embedded 4 lines from file snippets/sample.php␊
test/fixtures/fixture-in-place.md#L185-L204 Embedded 16 lines from file snippets/sample.cs␊
test/fixtures/fixture-in-place.md#L208-L213 Embedded 2 lines from file snippets/sample.swift␊
test/fixtures/fixture-in-place.md#L217-L224 Embedded 4 lines from file snippets/sample.xml␊
test/fixtures/fixture-in-place.md#L228-L234 Embedded 3 lines from file snippets/sample.yaml␊
test/fixtures/fixture-in-place.md#L240-L245 Embedded 4 lines from file snippets/sample.json␊
test/fixtures/fixture-in-place.md#L249-L256 Embedded 4 lines from file snippets/sample.json5␊
test/fixtures/fixture-in-place.md#L260-L265 Embedded 2 lines from file snippets/sample.rb␊
test/fixtures/fixture-in-place.md#L269-L274 Embedded 2 lines from file snippets/sample.cr␊
test/fixtures/fixture-in-place.md#L278-L285 Embedded 4 lines from file snippets/sample.kt␊
test/fixtures/fixture-in-place.md#L289-L298 Embedded 6 lines from file snippets/sample.scala␊
test/fixtures/fixture-in-place.md#L302-L312 Embedded 7 lines from file snippets/sample.puml␊
test/fixtures/fixture-in-place.md#L316-L329 Embedded 10 lines from file snippets/sample.mermaid␊
test/fixtures/fixture-in-place.md#L333-L346 Embedded 10 lines from file snippets/sample.proto␊
test/fixtures/fixture-in-place.md#L350-L357 Embedded 4 lines from file snippets/sample.cmake␊
test/fixtures/fixture-in-place.md#L361-L367 Embedded 3 lines from file snippets/sample.sql␊
test/fixtures/fixture-in-place.md#L371-L376 Embedded 2 lines from file snippets/sample.hs␊
test/fixtures/fixture-in-place.md#L380-L386 Embedded 3 lines from file snippets/sample␊
test/fixtures/fixture-in-place.md#L390-L401 Embedded 8 lines from file snippets/sample.cs#L6-L13␊
test/fixtures/fixture-in-place.md#L405-L412 Embedded 4 lines from file snippets/sample.ts␊
test/fixtures/fixture-in-place.md#L418-L420 "Ignore next" comment detected, skipping code block...␊
test/fixtures/fixture-in-place.md#L426-L428 "Ignore next" comment detected, skipping code block...␊
test/fixtures/fixture-in-place.md#L434-L439 Embedded 4 lines from file snippets/sample.ts␊
test/fixtures/fixture-in-place.md#L445-L450 Embedded 4 lines from file snippets/sample.json␊
test/fixtures/fixture-in-place.md#L456-L457 Code block is empty & no preceding embedme comment, skipping...␊
test/fixtures/fixture-in-place.md#L461-L463 Unsupported file extension [binary], supported extensions are txt, ts, js, scss, rust, java, cpp, c, html, xml, md, yaml, json, json5, py, bash, sh, go, objectivec, php, cs, swift, rb, kotlin, scala, cr, puml, mermaid, cmake, proto, sql, hs, skipping code block␊
test/fixtures/fixture-in-place.md#L467-L469 No code extension detected, skipping code block...␊
test/fixtures/fixture-in-place.md#L473-L475 No comment detected in first line for block with extension ts␊
test/fixtures/fixture-in-place.md#L479-L481 Found filename also-not-a-file in comment in first line, but file does not exist at ${cwd}/test/fixtures/also-not-a-file!␊
test/fixtures/fixture-in-place.md#L485-L487 Found filename this-file-does-not-exist.txt in comment in first line, but file does not exist at ${cwd}/test/fixtures/this-file-does-not-exist.txt!␊
test/fixtures/fixture-in-place.md#L491-L493 Found filename contains-codefence.md in comment in first line, but file does not exist at ${cwd}/test/fixtures/contains-codefence.md!␊
test/fixtures/fixture-in-place.md#L497-L503 Found filename contains-codefence.md in comment in first line, but file does not exist at ${cwd}/test/fixtures/contains-codefence.md!␊
test/fixtures/fixture-in-place.md#L507-L509 Incorrectly formatted line numbering string snippets/sample.ts#L1-2, Expecting Github formatting e.g. #L10-L20␊
test/fixtures/fixture-in-place.md#L513-L515 Code block is empty & no preceding embedme comment, skipping...␊
test/fixtures/fixture-in-place.md#L79-L91 Embedded 9 lines from file snippets/sample.ino␊
test/fixtures/fixture-in-place.md#L95-L106 Embedded 8 lines from file snippets/sample.c␊
test/fixtures/fixture-in-place.md#L110-L122 Embedded 9 lines from file snippets/sample.java␊
test/fixtures/fixture-in-place.md#L126-L137 Embedded 8 lines from file snippets/sample.go␊
test/fixtures/fixture-in-place.md#L141-L147 Embedded 3 lines from file snippets/sample.sh␊
test/fixtures/fixture-in-place.md#L151-L157 Embedded 3 lines from file snippets/sample.sh␊
test/fixtures/fixture-in-place.md#L161-L173 Embedded 9 lines from file snippets/sample.m␊
test/fixtures/fixture-in-place.md#L177-L186 Embedded 6 lines from file snippets/sample.scss␊
test/fixtures/fixture-in-place.md#L190-L197 Embedded 4 lines from file snippets/sample.php␊
test/fixtures/fixture-in-place.md#L201-L220 Embedded 16 lines from file snippets/sample.cs␊
test/fixtures/fixture-in-place.md#L224-L229 Embedded 2 lines from file snippets/sample.swift␊
test/fixtures/fixture-in-place.md#L233-L240 Embedded 4 lines from file snippets/sample.xml␊
test/fixtures/fixture-in-place.md#L244-L250 Embedded 3 lines from file snippets/sample.yaml␊
test/fixtures/fixture-in-place.md#L256-L261 Embedded 4 lines from file snippets/sample.json␊
test/fixtures/fixture-in-place.md#L265-L272 Embedded 4 lines from file snippets/sample.json5␊
test/fixtures/fixture-in-place.md#L276-L281 Embedded 2 lines from file snippets/sample.rb␊
test/fixtures/fixture-in-place.md#L285-L290 Embedded 2 lines from file snippets/sample.cr␊
test/fixtures/fixture-in-place.md#L294-L301 Embedded 4 lines from file snippets/sample.kt␊
test/fixtures/fixture-in-place.md#L305-L314 Embedded 6 lines from file snippets/sample.scala␊
test/fixtures/fixture-in-place.md#L318-L328 Embedded 7 lines from file snippets/sample.puml␊
test/fixtures/fixture-in-place.md#L332-L345 Embedded 10 lines from file snippets/sample.mermaid␊
test/fixtures/fixture-in-place.md#L349-L362 Embedded 10 lines from file snippets/sample.proto␊
test/fixtures/fixture-in-place.md#L366-L373 Embedded 4 lines from file snippets/sample.cmake␊
test/fixtures/fixture-in-place.md#L377-L383 Embedded 3 lines from file snippets/sample.sql␊
test/fixtures/fixture-in-place.md#L387-L392 Embedded 2 lines from file snippets/sample.hs␊
test/fixtures/fixture-in-place.md#L396-L402 Embedded 3 lines from file snippets/sample␊
test/fixtures/fixture-in-place.md#L406-L417 Embedded 8 lines from file snippets/sample.cs#L6-L13␊
test/fixtures/fixture-in-place.md#L421-L428 Embedded 4 lines from file snippets/sample.ts␊
test/fixtures/fixture-in-place.md#L434-L436 "Ignore next" comment detected, skipping code block...␊
test/fixtures/fixture-in-place.md#L442-L444 "Ignore next" comment detected, skipping code block...␊
test/fixtures/fixture-in-place.md#L450-L455 Embedded 4 lines from file snippets/sample.ts␊
test/fixtures/fixture-in-place.md#L461-L466 Embedded 4 lines from file snippets/sample.json␊
test/fixtures/fixture-in-place.md#L472-L473 Code block is empty & no preceding embedme comment, skipping...␊
test/fixtures/fixture-in-place.md#L477-L479 Unsupported file extension [binary], supported extensions are txt, ts, js, scss, rust, java, cpp, c, html, xml, md, yaml, json, json5, py, bash, sh, go, objectivec, php, cs, swift, rb, kotlin, scala, cr, puml, mermaid, cmake, proto, sql, hs, ino, skipping code block␊
test/fixtures/fixture-in-place.md#L483-L485 No code extension detected, skipping code block...␊
test/fixtures/fixture-in-place.md#L489-L491 No comment detected in first line for block with extension ts␊
test/fixtures/fixture-in-place.md#L495-L497 Found filename also-not-a-file in comment in first line, but file does not exist at ${cwd}/test/fixtures/also-not-a-file!␊
test/fixtures/fixture-in-place.md#L501-L503 Found filename this-file-does-not-exist.txt in comment in first line, but file does not exist at ${cwd}/test/fixtures/this-file-does-not-exist.txt!␊
test/fixtures/fixture-in-place.md#L507-L509 Found filename contains-codefence.md in comment in first line, but file does not exist at ${cwd}/test/fixtures/contains-codefence.md!␊
test/fixtures/fixture-in-place.md#L513-L519 Found filename contains-codefence.md in comment in first line, but file does not exist at ${cwd}/test/fixtures/contains-codefence.md!␊
test/fixtures/fixture-in-place.md#L523-L525 Incorrectly formatted line numbering string snippets/sample.ts#L1-2, Expecting Github formatting e.g. #L10-L20␊
test/fixtures/fixture-in-place.md#L529-L531 Code block is empty & no preceding embedme comment, skipping...␊
Writing test/fixtures/fixture-in-place.md with embedded changes.␊
`

Expand Down
Binary file modified test/snapshots/test.ts.snap
Binary file not shown.

0 comments on commit f282789

Please sign in to comment.