Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
feat(#623): ignore prettier
Browse files Browse the repository at this point in the history
Signed-off-by: peterpeterparker <david.dalbusco@outlook.com>
  • Loading branch information
peterpeterparker committed Feb 23, 2020
1 parent 32abb38 commit 3d08b91
Showing 1 changed file with 68 additions and 58 deletions.
126 changes: 68 additions & 58 deletions webcomponents/highlight-code/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ <h1>Editable:</h1>
<!-- prettier-ignore -->
<deckgo-highlight-code language="java" editable="true" highlight-lines="0,2 6,6" line-numbers="true">
<code slot="code">interface NumericTest {
boolean computeTest(int n);
}
boolean computeTest(int n);
}

// Yolo
// Yolo

public static void main(String args[]) {
NumericTest isEven = (n) -> (n % 2) == 0;
NumericTest isNegative = (n) -> (n < 0);
public static void main(String args[]) {
NumericTest isEven = (n) -> (n % 2) == 0;
NumericTest isNegative = (n) -> (n < 0);

// Output: false
System.out.println(isEven.computeTest(5));
// Output: false
System.out.println(isEven.computeTest(5));

// Output: true
System.out.println(isNegative.computeTest(-5));
}</code>
// Output: true
System.out.println(isNegative.computeTest(-5));
}</code>
</deckgo-highlight-code>

<script type="text/javascript">
Expand Down Expand Up @@ -84,32 +84,32 @@ <h1>Typescript</h1>
<!-- prettier-ignore -->
<deckgo-highlight-code language="typescript" highlight-lines="1,1" line-numbers="true"
style="--deckgo-highlight-code-line-background: lightgrey;">
<code slot="code">@Method()
isMobile(): Promise&lt;boolean> {
return new Promise&lt;boolean>((resolve) => {
<code slot="code">@Method()
isMobile(): Promise&lt;boolean> {
return new Promise&lt;boolean>((resolve) => {
resolve(DeckdeckgoUtils.isMobile());
});
}</code>
});
}</code>
</deckgo-highlight-code>

<h1>Plain code and java language:</h1>

<!-- prettier-ignore -->
<deckgo-highlight-code language="java" highlight-lines="3,5 7,8" style="--deckgo-highlight-code-line-background: red;">
<code slot="code">interface NumericTest {
boolean computeTest(int n);
}
<code slot="code">interface NumericTest {
boolean computeTest(int n);
}

public static void main(String args[]) {
NumericTest isEven = (n) -> (n % 2) == 0;
NumericTest isNegative = (n) -> (n < 0);
public static void main(String args[]) {
NumericTest isEven = (n) -> (n % 2) == 0;
NumericTest isNegative = (n) -> (n < 0);

// Output: false
System.out.println(isEven.computeTest(5));
// Output: false
System.out.println(isEven.computeTest(5));

// Output: true
System.out.println(isNegative.computeTest(-5));
}</code>
// Output: true
System.out.println(isNegative.computeTest(-5));
}</code>
</deckgo-highlight-code>

<deckgo-highlight-code language="bash" line-numbers="true">
Expand All @@ -118,51 +118,61 @@ <h1>Plain code and java language:</h1>

<!-- prettier-ignore -->
<deckgo-highlight-code language="bash">
<code slot="code">Cool, let's kick start a new DeckDeckGo presentation

? What's your project name (will be use to create a new folder)? (deckdeckgo)
? What's your presentation name (max. 45 characters, will be use for meta tags and manifest information)?
(DeckDeckGo)
? What's your presentation about (its description)? (Create a lightweight presentation using Web Components 🚀)
? What's your name (will be use for the author meta information)? (David)
? What method do you want to use to edit your presentation? (Use arrow keys)
❯ HTML
Markdown</code>
<code slot="code">Cool, let's kick start a new DeckDeckGo presentation

? What's your project name (will be use to create a new folder)? (deckdeckgo)
? What's your presentation name (max. 45 characters, will be use for meta tags and manifest information)?
(DeckDeckGo)
? What's your presentation about (its description)? (Create a lightweight presentation using Web Components 🚀)
? What's your name (will be use for the author meta information)? (David)
? What method do you want to use to edit your presentation? (Use arrow keys)
❯ HTML
Markdown</code>
</deckgo-highlight-code>

<!-- prettier-ignore -->
<h1>Without line numbers</h1>

<!-- prettier-ignore -->
<deckgo-highlight-code language="java" highlight-lines="0,2 6,6">
<code slot="code"
>interface NumericTest { boolean computeTest(int n); } public static void main(String args[]) { NumericTest isEven = (n) -> (n % 2) == 0; NumericTest
isNegative = (n) -> (n < 0); // Output: false System.out.println(isEven.computeTest(5)); // Output: true System.out.println(isNegative.computeTest(-5));
}</code
>
</deckgo-highlight-code>
<code slot="code">interface NumericTest {
boolean computeTest(int n);
}

public static void main(String args[]) {
NumericTest isEven = (n) -> (n % 2) == 0;
NumericTest isNegative = (n) -> (n < 0);

// Output: false
System.out.println(isEven.computeTest(5));

// Output: true
System.out.println(isNegative.computeTest(-5));
}</code>
</deckgo-highlight-code>

<h1>Issue #423</h1>

<!-- prettier-ignore -->
<deckgo-highlight-code language="java" highlight-lines="6,7 13,14">
<code slot="code"># main.tf

resource "aws_lambda_function" "api" {
function_name = "deckdeckgo-handler-lambda"
resource "aws_lambda_function" "api" {
function_name = "deckdeckgo-handler-lambda"

filename =
data.external.build-function.result.path
filename =
data.external.build-function.result.path

runtime = ...
}
runtime = ...
}

data "external" "build-function" {
program = [
"nix",
"eval",
"(import ./default.nix).function-handler-path",
"--json",
]
}</code>
data "external" "build-function" {
program = [
"nix",
"eval",
"(import ./default.nix).function-handler-path",
"--json",
]
}</code>
</deckgo-highlight-code>
</body>
</html>

0 comments on commit 3d08b91

Please sign in to comment.