Browse Source

make "Markdown" uppercase

Falko Schindler 2 years ago
parent
commit
e3ac541aed
7 changed files with 12 additions and 12 deletions
  1. 2 2
      README.md
  2. 1 1
      main.py
  3. 3 3
      nicegui/elements/markdown.py
  4. 1 1
      nicegui/elements/mermaid.py
  5. 3 3
      tests/test_markdown.py
  6. 1 1
      website/reference.py
  7. 1 1
      website/static/header.html

+ 2 - 2
README.md

@@ -6,7 +6,7 @@
 # NiceGUI
 
 NiceGUI is an easy-to-use, Python-based UI framework, which shows up in your web browser.
-You can create buttons, dialogs, markdown, 3D scenes, plots and much more.
+You can create buttons, dialogs, Markdown, 3D scenes, plots and much more.
 
 It is great for micro web apps, dashboards, robotics projects, smart home solutions and similar use cases.
 You can also use it in development, for example when tweaking/configuring a machine learning algorithm or tuning motor controllers.
@@ -28,7 +28,7 @@ NiceGUI is available as [PyPI package](https://pypi.org/project/nicegui/), [Dock
 - implicit reload on code change
 - standard GUI elements like label, button, checkbox, switch, slider, input, file upload, ...
 - simple grouping with rows, columns, cards and dialogs
-- general-purpose HTML and markdown elements
+- general-purpose HTML and Markdown elements
 - powerful high-level elements to
   - plot graphs and charts,
   - render 3D scenes,

+ 1 - 1
main.py

@@ -122,7 +122,7 @@ async def index_page(client: Client):
             features('space_dashboard', 'Layout', [
                 'navigation bars, tabs, panels, ...',
                 'grouping with rows, columns and cards',
-                'HTML and markdown elements',
+                'HTML and Markdown elements',
                 'flex layout by default',
             ])
             features('insights', 'Visualization', [

+ 3 - 3
nicegui/elements/markdown.py

@@ -16,9 +16,9 @@ class Markdown(ContentElement):
     def __init__(self, content: str = '', *, extras: List[str] = ['fenced-code-blocks', 'tables']) -> None:
         """Markdown Element
 
-        Renders markdown onto the page.
+        Renders Markdown onto the page.
 
-        :param content: the markdown content to be displayed
+        :param content: the Markdown content to be displayed
         :param extras: list of `markdown2 extensions <https://github.com/trentm/python-markdown2/wiki/Extras#implemented-extras>`_ (default: `['fenced-code-blocks', 'tables']`)
         """
         self.extras = extras
@@ -34,7 +34,7 @@ class Markdown(ContentElement):
 @lru_cache(maxsize=int(os.environ.get('MARKDOWN_CONTENT_CACHE_SIZE', '1000')))
 def prepare_content(content: str, extras: str) -> str:
     html = markdown2.markdown(content, extras=extras.split())
-    return apply_tailwind(html)  # we need explicit markdown styling because tailwind CSS removes all default styles
+    return apply_tailwind(html)  # we need explicit Markdown styling because tailwind CSS removes all default styles
 
 
 def apply_tailwind(html: str) -> str:

+ 1 - 1
nicegui/elements/mermaid.py

@@ -10,7 +10,7 @@ class Mermaid(ContentElement):
         '''Mermaid Diagrams
 
         Renders diagrams and charts written in the Markdown-inspired `Mermaid <https://mermaid.js.org/>`_ language.
-        The mermaid syntax can also be used inside markdown elements by providing the extension string 'mermaid' to the ``ui.markdown`` element.
+        The mermaid syntax can also be used inside Markdown elements by providing the extension string 'mermaid' to the ``ui.markdown`` element.
 
         :param content: the Mermaid content to be displayed
         '''

+ 3 - 3
tests/test_markdown.py

@@ -4,12 +4,12 @@ from .screen import Screen
 
 
 def test_markdown(screen: Screen):
-    m = ui.markdown('This is **markdown**')
+    m = ui.markdown('This is **Markdown**')
 
     screen.open('/')
     element = screen.find('This is')
-    assert element.text == 'This is markdown'
-    assert element.get_attribute('innerHTML') == 'This is <strong>markdown</strong>'
+    assert element.text == 'This is Markdown'
+    assert element.get_attribute('innerHTML') == 'This is <strong>Markdown</strong>'
 
     m.set_content('New **content**')
     element = screen.find('New')

+ 1 - 1
website/reference.py

@@ -860,4 +860,4 @@ You can set the following environment variables to configure NiceGUI:
     def env_var_example():
         from nicegui.elements import markdown
 
-        ui.label(f'markdown content cache size is {markdown.prepare_content.cache_info().maxsize}')
+        ui.label(f'Markdown content cache size is {markdown.prepare_content.cache_info().maxsize}')

+ 1 - 1
website/static/header.html

@@ -1,6 +1,6 @@
 <meta
   name="description"
-  content="NiceGUI is an easy-to-use, Python-based UI framework, which shows up in your web browser. You can create buttons, dialogs, markdown, 3D scenes, plots and much more."
+  content="NiceGUI is an easy-to-use, Python-based UI framework, which shows up in your web browser. You can create buttons, dialogs, Markdown, 3D scenes, plots and much more."
 />
 
 <!-- https://realfavicongenerator.net/ -->