Commit 789f11b7 authored by Adrian Wuillemet's avatar Adrian Wuillemet
Browse files

#65 Fix minor issues

parent bc9dec38
...@@ -219,7 +219,7 @@ def filter_languages(search_text: str) -> iter: ...@@ -219,7 +219,7 @@ def filter_languages(search_text: str) -> iter:
:return: ALl languages that contain the search_text. :return: ALl languages that contain the search_text.
""" """
for language in supported_languages: for language in sorted(supported_languages):
if search_text is None or search_text in language: if search_text is None or search_text in language:
yield language yield language
......
...@@ -70,6 +70,7 @@ def parse_beads(file: IO) -> dict: ...@@ -70,6 +70,7 @@ def parse_beads(file: IO) -> dict:
transitions: list = [] transitions: list = []
first_line = file.readline() first_line = file.readline()
file.seek(0)
if first_line.strip().startswith('#!'): if first_line.strip().startswith('#!'):
config = read_config(first_line) config = read_config(first_line)
...@@ -100,7 +101,7 @@ def parse_beads(file: IO) -> dict: ...@@ -100,7 +101,7 @@ def parse_beads(file: IO) -> dict:
return content return content
def decode_line(transition: str) -> list: def decode_line(transition: str) -> tuple:
""" """
Decode a line of a .bead file Decode a line of a .bead file
...@@ -140,7 +141,7 @@ def wrap_node_names(nodes: set, initial_node: str or None) -> list: ...@@ -140,7 +141,7 @@ def wrap_node_names(nodes: set, initial_node: str or None) -> list:
nodes_list: list = [] nodes_list: list = []
for node_name in nodes: for node_name in sorted(nodes):
node = {ID: node_name} node = {ID: node_name}
if initial_node and node_name == initial_node: if initial_node and node_name == initial_node:
......
...@@ -3,7 +3,7 @@ function setInfo(info: string) { ...@@ -3,7 +3,7 @@ function setInfo(info: string) {
info = info.replace(/\\u00a9/g, '©'); info = info.replace(/\\u00a9/g, '©');
let article = d3.create("article") let article = d3.create("article")
.html(`<article>${info}</article>`) .html(info)
.node(); .node();
article.querySelectorAll("pre").forEach(pre => { article.querySelectorAll("pre").forEach(pre => {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment