Skip to content

Commit

Permalink
Merge pull request #51 from cmason3/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
cmason3 authored Dec 2, 2024
2 parents 0f7de28 + 98588d1 commit 41cabc9
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 11 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## CHANGELOG

### [24.12.0] - Dec 2, 2024
- Updated `data.csv` pane so it handles escaped commas as per JinjaFx 1.22.1
- Updated `github-markdown-css` to 5.8.1
- Updated copyright notices in preparation for 2025

### [24.10.1] - Nov 4, 2024
- Don't call `socket.shutdown()` before `socket.close()` else it raises an error on MacOS
- Updated `github-markdown-css` to 5.7.0
Expand Down Expand Up @@ -343,6 +348,7 @@
### 21.11.0 - Nov 29, 2021
- Initial release

[24.12.0]: https://github.com/cmason3/jinjafx_server/compare/24.10.1...24.12.0
[24.10.1]: https://github.com/cmason3/jinjafx_server/compare/24.10.0...24.10.1
[24.10.0]: https://github.com/cmason3/jinjafx_server/compare/24.9.0...24.10.0
[24.9.0]: https://github.com/cmason3/jinjafx_server/compare/24.6.4...24.9.0
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020-2024 Chris Mason ([email protected])
Copyright (c) 2020-2025 Chris Mason ([email protected])

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion contrib/update_cdnjs_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
'dayjs': '1.11.13',
'pako': '2.1.0',
'jszip': '3.10.1',
'github-markdown-css': '5.7.0'
'github-markdown-css': '5.8.1'
}

def update_file(cdnjs_url, sri, f):
Expand Down
8 changes: 4 additions & 4 deletions jinjafx_server.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3

# JinjaFx Server - Jinja2 Templating Tool
# Copyright (c) 2020-2024 Chris Mason <[email protected]>
# Copyright (c) 2020-2025 Chris Mason <[email protected]>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
Expand All @@ -28,7 +28,7 @@
import re, argparse, hashlib, traceback, glob, hmac, uuid, struct, binascii, gzip, requests, ctypes, subprocess
import cmarkgfm, emoji

__version__ = '24.10.1'
__version__ = '24.12.0'

llock = threading.RLock()
rlock = threading.RLock()
Expand Down Expand Up @@ -553,7 +553,7 @@ def html_escape(text):
options = (cmarkgfm.cmark.Options.CMARK_OPT_GITHUB_PRE_LANG | cmarkgfm.cmark.Options.CMARK_OPT_SMART | cmarkgfm.cmark.Options.CMARK_OPT_UNSAFE)
output = cmarkgfm.github_flavored_markdown_to_html(html_escape(output), options).replace('&amp;amp;', '&amp;').replace('&amp;', '&')
head = '<!DOCTYPE html>\n<html>\n<head>\n'
head += '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.7.0/github-markdown.min.css" crossorigin="anonymous">\n'
head += '<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.8.1/github-markdown.min.css" crossorigin="anonymous">\n'
head += '<style>\n pre, code { white-space: pre-wrap !important; word-wrap: break-word !important; }\n</style>\n</head>\n'
output = emoji.emojize(output, language='alias').encode('ascii', 'xmlcharrefreplace').decode('utf-8')
output = head + '<body>\n<div class="markdown-body">\n' + output + '</div>\n</body>\n</html>\n'
Expand Down Expand Up @@ -928,7 +928,7 @@ def main(rflag=[0]):

try:
print('JinjaFx Server v' + __version__ + ' - Jinja2 Templating Tool')
print('Copyright (c) 2020-2024 Chris Mason <[email protected]>\n')
print('Copyright (c) 2020-2025 Chris Mason <[email protected]>\n')

update_versioned_links(base + '/www')

Expand Down
2 changes: 1 addition & 1 deletion jinjafx_server/__main__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3

# JinjaFx Server - Jinja2 Templating Tool
# Copyright (c) 2020-2024 Chris Mason <[email protected]>
# Copyright (c) 2020-2025 Chris Mason <[email protected]>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
packages=["jinjafx_server"],
include_package_data=True,
package_data={'': ['www/*', 'pandoc/reference.docx']},
install_requires=["jinjafx>=1.13.0", "requests", "cmarkgfm>=0.5.0", "emoji"],
install_requires=["jinjafx>=1.22.1", "requests", "cmarkgfm>=0.5.0", "emoji"],
entry_points={
"console_scripts": [
"jinjafx_server=jinjafx_server:main",
Expand Down
2 changes: 1 addition & 1 deletion www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-yaml/4.1.0/js-yaml.min.js" integrity="sha512-CSBhVREyzHAjAFfBlIBakjoRUKp5h7VSweP0InR/pAJyptH7peuhCsqAI/snV+TwZmXZqoUklpXp6R6wMnYf5Q==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dayjs/1.11.13/dayjs.min.js" integrity="sha512-FwNWaxyfy2XlEINoSnZh1JQ5TRRtGow0D6XcmAWmYCRgvqOUTnzCxPc9uF35u5ZEpirk1uhlPVA19tflhvnW1g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dayjs/1.11.13/plugin/relativeTime.min.js" integrity="sha512-MVzDPmm7QZ8PhEiqJXKz/zw2HJuv61waxb8XXuZMMs9b+an3LoqOqhOEt5Nq3LY1e4Ipbbd/e+AWgERdHlVgaA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="/d11d2c2f/jinjafx_m.js"></script>
<script src="/d6dd9633/jinjafx_m.js"></script>
</head>
<body>
<div id="overlay"></div>
Expand Down
4 changes: 2 additions & 2 deletions www/jinjafx_m.js
Original file line number Diff line number Diff line change
Expand Up @@ -1645,7 +1645,7 @@ function getStatusText(code) {
function get_csv_astable(datarows) {
var tc = (datarows[0].match(/\t/g) || []).length;
var cc = (datarows[0].match(/,/g) || []).length;
var delim = new RegExp(cc > tc ? '[ \\t]*,[ \\t]*' : ' *\\t *');
var delim = new RegExp(cc > tc ? '[ \\t]*(?<!\\\\),[ \\t]*' : ' *\\t *');
var hrow = datarows[0].split(delim);

var table = '<table class="table table-responsive table-hover table-sm">';
Expand All @@ -1666,7 +1666,7 @@ function getStatusText(code) {
}

for (var col = 0; col < hrow.length; col++) {
var value = ((col < rowdata.length) ? quote(rowdata[col]) : '');
var value = ((col < rowdata.length) ? quote(rowdata[col]) : '').replace(/\\,/g, ',');
table += '<td>' + (!value.match(/\S/) ? '&nbsp;' : value) + '</td>';
}
table += '</tr>';
Expand Down

0 comments on commit 41cabc9

Please sign in to comment.