GetRD / academic-file-converter

📚 Import Bibtex publications and Jupyter Notebook blog posts into your Markdown website or book. 将Bibtex转换为Markdown网站

Home Page:https://docs.hugoblox.com/reference/content-types/#automatically-import-publications-from-bibtex

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Newline character needed

Harvester57 opened this issue · comments

Hello all,

Every time I update/clean install this Python package, I have to manually add a newline character \n at line https://github.com/sourcethemes/academic-admin/blob/e144c4fe6e4df3357764cfb37481343d1ff91cc9/academic/cli.py#L334

My code looks like f.write(source_file.read() + '\n')

Otherwise, some comments at the beginning of the CSS and JS files are not properly escaped, thus ending in a dysfunctional main.min.js script, and in errors in the Console tab of Developer Tools in Chrome/Firefox.

Am I the only one having this issue ?

Thanks !

Here's an example with academic v0.2.8 pulled from this repo:

capture d ecran du 2019-02-11 15-40-12

Without the newline character, the first line of the Isotope JS file (the /*! beginning a comment section) gets appended at line 9, which has a single-line comment syntax, effectively breaking the comment section below (line 10-17)

Here is the same line from main.min.js, pulled after I added my fix to the Python code mentioned in the first post:

capture d ecran du 2019-02-11 15-47-03

The main drawback from this is the fact that the code is not minified anymore.