stocky-helicopter-69669
12/15/2023, 7:15 AMMarkdownRenderer
which seem to only parse Markdown partially. Deck content start with Header 1 (#
) and then all the rest is displayed as a Header 1 despite newlines or new headers being introduced. Also it does not recognize other syntax (I copied exactly the same content into GitHub and it works fine). Any idea?stocky-helicopter-69669
12/15/2023, 7:16 AMDeck("page content", MarkdownRenderer().to_html(generated_content))
glamorous-carpet-83516
12/15/2023, 7:18 AMstocky-helicopter-69669
12/15/2023, 7:23 AMglamorous-carpet-83516
12/15/2023, 7:23 AM@task(enable_deck=True, container_image=imageSpec)
def foo() -> str:
Deck("source code", MarkdownRenderer().to_html("## Hello World"))
return "foo"
stocky-helicopter-69669
12/15/2023, 7:24 AM# Evaluating Second Derivatives in Implicit Equations <br> <br>## Introduction <br> <br>In advanced differentiation, we often encounter implicit equations where the dependent and independent variables are not explicitly defined.
glamorous-carpet-83516
12/15/2023, 7:24 AMglamorous-carpet-83516
12/15/2023, 7:24 AMstocky-helicopter-69669
12/15/2023, 7:27 AMglamorous-carpet-83516
12/15/2023, 7:31 AMglamorous-carpet-83516
12/15/2023, 7:31 AMglamorous-carpet-83516
12/15/2023, 7:31 AMfrom flytekit import workflow, task, Deck, ImageSpec
from flytekitplugins.deck import MarkdownRenderer
imageSpec = ImageSpec(registry="pingsutw", packages=["flytekitplugins-deck-standard"])
@task(enable_deck=True, container_image=imageSpec)
def foo() -> str:
Deck("source code", MarkdownRenderer().to_html("# Evaluating Second Derivatives in Implicit Equations \n \n## Introduction \n \nIn advanced differentiation, we often encounter implicit equations where the dependent and independent variables are not explicitly defined. "))
return "foo"
@workflow
def wf():
foo()
if __name__ == '__main__':
foo()
glamorous-carpet-83516
12/15/2023, 7:32 AMstocky-helicopter-69669
12/15/2023, 7:32 AMstocky-helicopter-69669
12/15/2023, 7:32 AMglamorous-carpet-83516
12/15/2023, 7:33 AMstocky-helicopter-69669
12/15/2023, 7:34 AMglamorous-carpet-83516
12/15/2023, 7:36 AMglamorous-carpet-83516
12/15/2023, 7:36 AMstocky-helicopter-69669
12/15/2023, 7:36 AMstocky-helicopter-69669
12/15/2023, 7:37 AM<http://logger.info|logger.info>(f"Generated content: {generated_content}")
# this is value of generated_content which I copied from logs
# when pasted explicitly - works, when I comment line below and use value directly from generated_content - does not work
generated_content = "# Evaluating Second Derivatives in Implicit Equations\n\n## Introduction\nIn calculus, the second derivative of a function provides important information about the behavior of a function. It helps determine whether the function is concave up or concave down, as well as the location of inflection points. While evaluating second derivatives for explicit functions is relatively straightforward, it becomes more challenging when dealing with implicit equations where the derivative is not given explicitly. In this lesson, we will learn how to evaluate second derivatives in implicit equations.\n\n## Implicit Differentiation\nImplicit differentiation is a technique used to find"
Deck("page content", MarkdownRenderer().to_html(generated_content))
stocky-helicopter-69669
12/15/2023, 7:39 AM<http://logger.info|logger.info>
above) and then it works, otherwise it does not 😄stocky-helicopter-69669
12/15/2023, 7:51 AMgenerated_content = generated_content.replace('\\n', '<br>').replace('<br>', '\n')